interface AdapterInterface
Interface for adapters.
Constants
ID_METHOD_NONE |
|
ID_METHOD_AUTOINCREMENT |
|
ID_METHOD_SEQUENCE |
|
Methods
ConnectionInterface |
getConnection(array $conparams)
Build database connection |
|
setCharset(ConnectionInterface $con, string $charset)
Sets the character encoding using SQL standard SET NAMES statement. |
||
string |
ignoreCaseInOrderBy(string $in)
This method is used to ignore case in an ORDER BY clause. |
|
string |
getStringDelimiter()
Returns the character used to indicate the beginning and end of a piece of text used in a SQL statement (generally a single quote). |
|
string |
concatString(string $s1, string $s2)
Returns SQL which concatenates the second string to the first. |
|
string |
subString(string $s, integer $pos, integer $len)
Returns SQL which extracts a substring. |
|
string |
strLength(string $s)
Returns SQL which calculates the length (in chars) of a string. |
|
string |
quoteIdentifier(string $text)
Quotes database object identifiers (table names, col names, sequences, etc.). |
|
string |
quoteIdentifierTable(string $table)
Quotes a database table which could have space separating it from an alias, both should be identified separately. |
|
boolean |
isGetIdBeforeInsert()
Whether this adapter uses an ID generation system that requires getting ID _before_ performing INSERT. |
|
boolean |
isGetIdAfterInsert()
Whether this adapter uses an ID generation system that requires getting ID _before_ performing INSERT. |
|
mixed |
getId(ConnectionInterface $con, string $name = null)
Gets the generated ID (either last ID for autoincrement or next sequence ID). |
|
string |
formatTemporalValue(mixed $value, ColumnMap $cMap)
Formats a temporal value before binding, given a ColumnMap object |
|
string |
getTimestampFormatter()
Returns timestamp formatter string for use in date() function. |
|
string |
getDateFormatter()
Returns date formatter string for use in date() function. |
|
string |
getTimeFormatter()
Returns time formatter string for use in date() function. |
|
useQuoteIdentifier()
Should Column-Names get identifiers for inserts or updates. |
Details
at line 33
public ConnectionInterface
getConnection(array $conparams)
Build database connection
at line 46
public
setCharset(ConnectionInterface $con, string $charset)
Sets the character encoding using SQL standard SET NAMES statement.
This method is invoked from the default initConnection() method and must
be overridden for an RDMBS which does _not_ support this SQL standard.
at line 57
public string
ignoreCaseInOrderBy(string $in)
This method is used to ignore case in an ORDER BY clause.
Usually it is the same as ignoreCase, but some databases
(Interbase for example) does not use the same SQL in ORDER BY
and other clauses.
at line 66
public string
getStringDelimiter()
Returns the character used to indicate the beginning and end of a piece of text used in a SQL statement (generally a single quote).
at line 76
public string
concatString(string $s1, string $s2)
Returns SQL which concatenates the second string to the first.
at line 87
public string
subString(string $s, integer $pos, integer $len)
Returns SQL which extracts a substring.
at line 95
public string
strLength(string $s)
Returns SQL which calculates the length (in chars) of a string.
at line 102
public string
quoteIdentifier(string $text)
Quotes database object identifiers (table names, col names, sequences, etc.).
at line 113
public string
quoteIdentifierTable(string $table)
Quotes a database table which could have space separating it from an alias, both should be identified separately.
This doesn't take care of dots which
separate schema names from table names. Adapters for RDBMs which support
schemas have to implement that in the platform-specific way.
at line 120
public boolean
isGetIdBeforeInsert()
Whether this adapter uses an ID generation system that requires getting ID _before_ performing INSERT.
at line 127
public boolean
isGetIdAfterInsert()
Whether this adapter uses an ID generation system that requires getting ID _before_ performing INSERT.
at line 137
public mixed
getId(ConnectionInterface $con, string $name = null)
Gets the generated ID (either last ID for autoincrement or next sequence ID).
at line 147
public string
formatTemporalValue(mixed $value, ColumnMap $cMap)
Formats a temporal value before binding, given a ColumnMap object
at line 154
public string
getTimestampFormatter()
Returns timestamp formatter string for use in date() function.
at line 161
public string
getDateFormatter()
Returns date formatter string for use in date() function.
at line 168
public string
getTimeFormatter()
Returns time formatter string for use in date() function.
at line 181
public
useQuoteIdentifier()
Should Column-Names get identifiers for inserts or updates.
By default false is returned -> backwards compatibility.
it`s a workaround...!!!