|
|
@@ -66,6 +66,13 @@ class Table {
|
|
|
protected $_options = [];
|
|
|
|
|
|
/**
|
|
|
+ * Whether or not the table is temporary
|
|
|
+ *
|
|
|
+ * @var boolean
|
|
|
+ */
|
|
|
+ protected $_temporary = false;
|
|
|
+
|
|
|
+/**
|
|
|
* The valid keys that can be used in a column
|
|
|
* definition.
|
|
|
*
|
|
|
@@ -499,6 +506,20 @@ class Table {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * Get/Set whether the table is temporrary in the database
|
|
|
+ *
|
|
|
+ * @param boolean|null $set whether or not the table is to be temporary
|
|
|
+ * @return this|boolean Either the table instance, the current temporary setting
|
|
|
+ */
|
|
|
+ public function temporary($set = null) {
|
|
|
+ if ($set == null) {
|
|
|
+ return $this->_temporary;
|
|
|
+ }
|
|
|
+ $this->_temporary = (bool)$set;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+/**
|
|
|
* Generate the SQL to create the Table.
|
|
|
*
|
|
|
* Uses the connection to access the schema dialect
|