noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 18/20: DatabaseCore : clear prepare stmt


From: dwm
Subject: [Noalyss-commit] [noalyss] 18/20: DatabaseCore : clear prepare stmt
Date: Sun, 10 Dec 2023 03:22:24 -0500 (EST)

sparkyx pushed a commit to branch master
in repository noalyss.

commit 26f08f46fbce264ff8b2e24e7eda3a205bbfdfbc
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Dec 8 13:39:38 2023 +0100

    DatabaseCore : clear prepare stmt
---
 include/lib/database_core.class.php | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/include/lib/database_core.class.php 
b/include/lib/database_core.class.php
index 7f35f178b..8f566d761 100644
--- a/include/lib/database_core.class.php
+++ b/include/lib/database_core.class.php
@@ -1024,7 +1024,28 @@ class DatabaseCore
 
         }
     }
-    
+
+    /**
+     * @brief clear a prepare stmt
+     * @see DatabaseCore::is_prepare
+     * @see DatabaseCore::execute
+     * @see DatabaseCore::prepare
+     * @param $sql_name name of the prepare SQL
+     */
+    function clear_prepare($sql_name)
+    {
+        pg_exec($this->db,sprintf('DEALLOCATE 
"%s"'),DatabaseCore::escape_string($sql_name));
+    }
+    /**
+     * @brief clear all prepare stmt
+     * @see DatabaseCore::is_prepare
+     * @see DatabaseCore::execute
+     * @see DatabaseCore::prepare
+     */
+    function clear_all_prepare()
+    {
+        pg_exec($this->db,'DEALLOCATE ALL');
+    }
 }
 
 /* test::test_me(); */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]