Default implementation of ActiveRecord_Connection
Located in /activerecord/lib/ActiveRecord/Connection/Default.php (line 14)
PDO | --ActiveRecord_Connection | --ActiveRecord_Connection_Default
Class | Description |
---|---|
ActiveRecord_Connection_Mysql | ActiveRecordConnection for MySQL |
ActiveRecord_Connection_Sqlite | ActiveRecord_Connection for SQLite |
Constructor
Do not call this method directly. Call ActiveRecord_Connection::create instead.
Append a LIMIT clause to a SQL statement
Return an array of ActiveRecord_Column objects for the named table.
Return the sequence name that would be used to generated the
next value for the named key on the given table. Even if this connection does not support sequences or the resulting sequence does not exist, the name of what that sequence would be is returned.
Returns the next value from the named sequence. This function throws ActiveRecord_SequencesNotSupportedError if the connection does not support sequences.
Used to test whether this connection uses sequences to generate
primary keys for the given table. If a new primary key value should be fetched prior to inserting a new record into the named table, true is returned. Otherwise false is returned, and the caller can assume it is safe to invoke lastInsertId following the execution of the insert statement.
Quote a value for use by sanitizeSQL
Accepts a string or array containing an SQL statement or
fragment an performs parameter substitution. When a string is provided, it is returned verbatim, however, when an array is provide, is is assumed that the first item in the array is the SQL statement (or fragment) containing parameter placeholders (in the form of question marks) and that all subsequent items in the array are ordered parameters to be used for substituion.
For example, passing in the following:
Of course, this is actually more useful when passing in variables with unknown values as the parameters instead of literals, since sanitizeSQL handles any necessary escaping of the values.
Returns an array of table names in the database
Inherited From ActiveRecord_Connection
ActiveRecord_Connection::__construct()
ActiveRecord_Connection::addLimit()
ActiveRecord_Connection::columns()
ActiveRecord_Connection::create()
ActiveRecord_Connection::defaultSequenceName()
ActiveRecord_Connection::nextSequenceValue()
ActiveRecord_Connection::prefetchPrimaryKey()
ActiveRecord_Connection::sanitizeSQL()
ActiveRecord_Connection::selectAll()
ActiveRecord_Connection::selectValue()
ActiveRecord_Connection::tables()
Documentation generated on Wed, 25 Apr 2012 09:46:42 -0700 by phpDocumentor 1.4.3