summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-11-26 14:54:40 +0000
committerxue <>2006-11-26 14:54:40 +0000
commit59b18ff0ba446860cdb13e16db7ceb8f8bbe99f7 (patch)
tree760967c6ca09e0d8c9e50d5690b18e552e5e37f1 /framework
parentcb0aeb81d77d7170196f1b667978f56c6018100b (diff)
Added TDbConnection.setPersistent.
Diffstat (limited to 'framework')
-rw-r--r--framework/Data/TDbConnection.php27
1 files changed, 18 insertions, 9 deletions
diff --git a/framework/Data/TDbConnection.php b/framework/Data/TDbConnection.php
index acb1aec1..9652258d 100644
--- a/framework/Data/TDbConnection.php
+++ b/framework/Data/TDbConnection.php
@@ -363,6 +363,24 @@ class TDbConnection extends TComponent
}
/**
+ * @return boolean whether the connection is persistent or not
+ * Some DBMS (such as sqlite) may not support this feature.
+ */
+ public function getPersistent()
+ {
+ return $this->getAttribute(PDO::ATTR_PERSISTENT);
+ }
+
+ /**
+ * @param boolean whether the connection is persistent or not
+ * Some DBMS (such as sqlite) may not support this feature.
+ */
+ public function setPersistent($value)
+ {
+ return $this->setAttribute(PDO::ATTR_PERSISTENT,TPropertyValue::ensureBoolean($value));
+ }
+
+ /**
* @return string name of the DB driver
*/
public function getDriverName()
@@ -388,15 +406,6 @@ class TDbConnection extends TComponent
}
/**
- * @return boolean whether the connection is persistent or not
- * Some DBMS (such as sqlite) may not support this feature.
- */
- public function getPersistent()
- {
- return $this->getAttribute(PDO::ATTR_PERSISTENT);
- }
-
- /**
* @return boolean whether the connection performs data prefetching
*/
public function getPrefetch()