diff options
author | xue <> | 2006-11-26 14:54:40 +0000 |
---|---|---|
committer | xue <> | 2006-11-26 14:54:40 +0000 |
commit | 59b18ff0ba446860cdb13e16db7ceb8f8bbe99f7 (patch) | |
tree | 760967c6ca09e0d8c9e50d5690b18e552e5e37f1 /framework/Data/TDbConnection.php | |
parent | cb0aeb81d77d7170196f1b667978f56c6018100b (diff) |
Added TDbConnection.setPersistent.
Diffstat (limited to 'framework/Data/TDbConnection.php')
-rw-r--r-- | framework/Data/TDbConnection.php | 27 |
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()
|