Add a default _truncate() method to PDO
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index ab1e4ce..3197e75 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -400,6 +400,24 @@
return $sql;
}
+ // --------------------------------------------------------------------
+
+ /**
+ * Truncate statement
+ *
+ * Generates a platform-specific truncate string from the supplied data
+ *
+ * If the database does not support the truncate() command,
+ * then this method maps to 'DELETE FROM table'
+ *
+ * @param string the table name
+ * @return string
+ */
+ protected function _truncate($table)
+ {
+ return 'TRUNCATE TABLE '.$table;
+ }
+
}
/* End of file pdo_driver.php */
diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
index 893261b..b2e905c 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_4d_driver.php
@@ -178,24 +178,6 @@
// --------------------------------------------------------------------
/**
- * Truncate statement
- *
- * Generates a platform-specific truncate string from the supplied data
- *
- * If the database does not support the truncate() command,
- * then this method maps to 'DELETE FROM table'
- *
- * @param string the table name
- * @return string
- */
- protected function _truncate($table)
- {
- return 'TRUNCATE TABLE '.$table;
- }
-
- // --------------------------------------------------------------------
-
- /**
* Delete statement
*
* Generates a platform-specific delete string from the supplied data
diff --git a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
index 2c5dd84..2cab0f4 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_cubrid_driver.php
@@ -165,6 +165,24 @@
.$index.' IN('.implode(',', $ids).')';
}
+ // --------------------------------------------------------------------
+
+ /**
+ * Truncate statement
+ *
+ * Generates a platform-specific truncate string from the supplied data
+ *
+ * If the database does not support the truncate() command,
+ * then this method maps to 'DELETE FROM table'
+ *
+ * @param string the table name
+ * @return string
+ */
+ protected function _truncate($table)
+ {
+ return 'TRUNCATE '.$table;
+ }
+
}
/* End of file pdo_cubrid_driver.php */
diff --git a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
index a3e1181..fe9139a 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_dblib_driver.php
@@ -201,24 +201,6 @@
// --------------------------------------------------------------------
/**
- * Truncate statement
- *
- * Generates a platform-specific truncate string from the supplied data
- *
- * If the database does not support the truncate() command,
- * then this method maps to 'DELETE FROM table'
- *
- * @param string the table name
- * @return string
- */
- protected function _truncate($table)
- {
- return 'TRUNCATE TABLE '.$table;
- }
-
- // --------------------------------------------------------------------
-
- /**
* Delete statement
*
* Generates a platform-specific delete string from the supplied data
diff --git a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
index 1593ad4..c175f30 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_ibm_driver.php
@@ -213,24 +213,6 @@
// --------------------------------------------------------------------
/**
- * Truncate statement
- *
- * Generates a platform-specific truncate string from the supplied data
- *
- * If the database does not support the truncate() command,
- * then this method maps to 'DELETE FROM table'
- *
- * @param string the table name
- * @return string
- */
- protected function _truncate($table)
- {
- return 'TRUNCATE TABLE '.$table;
- }
-
- // --------------------------------------------------------------------
-
- /**
* Delete statement
*
* Generates a platform-specific delete string from the supplied data
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
index dcab4ec..fd7f327 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_driver.php
@@ -193,6 +193,24 @@
.$index.' IN('.implode(',', $ids).')';
}
+ // --------------------------------------------------------------------
+
+ /**
+ * Truncate statement
+ *
+ * Generates a platform-specific truncate string from the supplied data
+ *
+ * If the database does not support the truncate() command,
+ * then this method maps to 'DELETE FROM table'
+ *
+ * @param string the table name
+ * @return string
+ */
+ protected function _truncate($table)
+ {
+ return 'TRUNCATE '.$table;
+ }
+
}
/* End of file pdo_mysql_driver.php */
diff --git a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
index f728ce9..2b36086 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_oci_driver.php
@@ -185,24 +185,6 @@
// --------------------------------------------------------------------
/**
- * Truncate statement
- *
- * Generates a platform-specific truncate string from the supplied data
- *
- * If the database does not support the truncate() command,
- * then this method maps to 'DELETE FROM table'
- *
- * @param string the table name
- * @return string
- */
- protected function _truncate($table)
- {
- return 'TRUNCATE TABLE '.$table;
- }
-
- // --------------------------------------------------------------------
-
- /**
* Delete statement
*
* Generates a platform-specific delete string from the supplied data
diff --git a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
index a1865b5..dbf955c 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_sqlsrv_driver.php
@@ -230,24 +230,6 @@
// --------------------------------------------------------------------
/**
- * Truncate statement
- *
- * Generates a platform-specific truncate string from the supplied data
- *
- * If the database does not support the truncate() command,
- * then this method maps to 'DELETE FROM table'
- *
- * @param string the table name
- * @return string
- */
- protected function _truncate($table)
- {
- return 'TRUNCATE TABLE '.$table;
- }
-
- // --------------------------------------------------------------------
-
- /**
* Delete statement
*
* Generates a platform-specific delete string from the supplied data