Table
class Table (View source)
Manages reading and writing to a database table.
This class manages a database table and is used by the Model class for reading and writing to its database table. There is one instance of Table for every table you have a model for.
Properties
$class | |||
$conn | |||
$pk | |||
$last_sql | |||
$columns | |||
$table | Name of the table. | ||
$db_name | Name of the database (optional) | ||
$sequence | Name of the sequence for this table (optional). Defaults to {$table}_seq | ||
$cache_individual_model | Whether to cache individual models or not (not to be confused with caching of table schemas). | ||
$cache_model_expire | Expiration period for model caching. | ||
object | $callback | A instance of CallBack for this model/table |
Methods
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Retrieve a relationship object for this table. Strict as true will throw an error if the relationship name does not exist.
Does a given relationship exist?
No description
No description
No description
Details
at line 65
static
load($model_class_name)
at line 78
static
clear_cache($model_class_name = null)
at line 86
__construct($class_name)
at line 104
reestablish_connection($close = true)
at line 117
create_joins($joins)
at line 160
options_to_sql($options)
at line 213
find($options)
at line 222
cache_key_for_model($pk)
at line 231
find_by_sql($sql, $values = null, $readonly = false, $includes = null)
at line 300
get_column_by_inflected_name($inflected_name)
at line 310
get_fully_qualified_table_name($quote_name = true)
at line 329
HasOne|HasMany|BelongsTo
get_relationship($name, $strict = false)
Retrieve a relationship object for this table. Strict as true will throw an error if the relationship name does not exist.
at line 346
bool
has_relationship($name)
Does a given relationship exist?