diff options
Diffstat (limited to 'framework/Data')
-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()
|