프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$affected | string | String to hold how many rows were affected by the last SQL operation. | |
$alias | string | Database keyword used to assign aliases to identifiers. | |
$cacheMethods | boolean | Whether or not to cache the results of DboSource::name() and DboSource::conditions() into the memory cache. Set to false to disable the use of the memory cache. | |
$configKeyName | string | The DataSource configuration key name | |
$description | string | Description string for this Database Data Source. | |
$endQuote | string | The ending character that this DataSource uses for quoted identifiers. | |
$fieldParameters | array | List of engine specific additional field parameters used on table creating | |
$fullDebug | boolean | Print full query debug info? | |
$index | array | index definition, standard cake, primary, index, unique | |
$methodCache | array | Caches result from query parsing operations. Cached results for both DboSource::name() and DboSource::conditions() will be stored here. Method caching uses md5(). If you have problems with collisions, set DboSource::$cacheMethods to false. | |
$numRows | integer | Number of rows in current resultset | |
$startQuote | string | The starting character that this DataSource uses for quoted identifiers. | |
$tableParameters | array | List of table engine specific parameters used on table creating | |
$took | integer | Time the last query took | |
$useNestedTransactions | boolean | Flag to support nested transactions. If it is set to false, you will be able to use the transaction methods (begin/commit/rollback), but just the global transaction will be executed. | |
$virtualFieldSeparator | string | Separator string for virtualField composition |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_connection | array | A reference to the physical connection of this DataSource | |
$_encodingMaps | array | PHP←→DBエンコーディングマップ | |
$_methodCacheChange | boolean | Indicates whether there was a change on the cached results on the methods of this class This will be used for storing in a more persistent cache | |
$_queriesCnt | integer | Queries count. | |
$_queriesLog | array | Log of queries executed by this DataSource | |
$_queriesLogMax | integer | This is to prevent query log taking over too much memory. | |
$_queriesTime | integer | Total duration of all queries. | |
$_queryCache | array | Caches serialized results of executed queries | |
$_queryDefaults | array | Default fields that are used by the DBO | |
$_result | array | Result | |
$_sqlOps | array | The set of valid SQL operations usable in a WHERE statement | |
$_transactionNesting | integer | Indicates the level of nested transactions |
메소드 | 설명 | |
---|---|---|
__construct ( array $config = null, boolean $autoConnect = true ) | Constructor | |
__destruct ( ) | Used for storing in cache the results of the in-memory methodCache | |
addColumn ( array $options ) : boolean | カラムを追加する | |
alterSchema ( mixed $compare, string $table = null ) : boolean | Generate a alter syntax from CakeSchema::compare() | |
alterTable ( array $options ) : boolean | テーブル構造を変更する | |
alterTableBySchema ( array $options ) : boolean | スキーマファイルからテーブル構造を変更する | |
begin ( ) : boolean | Begin a transaction | |
boolean ( mixed $data, boolean $quote = false ) : string | boolean | Translates between PHP boolean values and Database (faked) boolean values | |
buildAssociationQuery ( Model $Model, array $queryData ) : string | Builds an SQL statement. | |
buildColumn ( array $column ) : string | Generate a database-native column schema string | |
buildIndex ( array $indexes, string $table = null ) : array | Format indexes for create table. | |
buildJoinStatement ( array $join ) : string | Builds and generates a JOIN condition from an array. Handles final clean-up before conversion. | |
buildRenameTable ( string $sourceName, string $targetName ) : string | テーブル名のリネームステートメントを生成 | |
buildStatement ( array $query, Model $Model ) : string | Builds and generates an SQL statement from an array. Handles final clean-up before conversion. | |
buildTableParameters ( array $parameters, string $table = null ) : array | Format parameters for create table | |
cacheMethod ( string $method, string $key, mixed $value = null ) : mixed | Cache a value into the methodCaches. Will respect the value of DboSource::$cacheMethods. | |
calculate ( Model $Model, string $func, array $params = [] ) : string | Returns an SQL calculation, i.e. COUNT() or MAX() | |
changeColumn ( array $options ) : boolean | カラムを変更する | |
close ( ) : void | Disconnects database, kills the connection and says the connection is closed. | |
commit ( ) : boolean | Commit a transaction | |
conditionKeysToString ( array $conditions, boolean $quoteValues = true, Model $Model = null ) : string | Creates a WHERE clause by parsing given conditions array. Used by DboSource::conditions(). | |
conditions ( mixed $conditions, boolean $quoteValues = true, boolean $where = true, Model $Model = null ) : string | Creates a WHERE clause by parsing given conditions data. If an array or string conditions are provided those conditions will be parsed and quoted. If a boolean is given it will be integer cast as condition. Null will return 1 = 1. | |
create ( Model $Model, array $fields = null, array $values = null ) : boolean | The "C" in CRUD | |
createSchema ( CakeSchema $schema, string $tableName = null ) : string | Generate a database-native schema for the given Schema object | |
createTable ( array $options ) : boolean | テーブルを作成する | |
createTableBySchema ( array $options ) : boolean | スキーマファイルからテーブルを生成する | |
defaultConditions ( Model $Model, string | array | boolean $conditions, boolean $useAlias = true ) : mixed | Creates a default set of conditions from the model if $conditions is null/empty. | |
delete ( Model $Model, mixed $conditions = null ) : boolean | Generates and executes an SQL DELETE statement. | |
disconnect ( ) : boolean | Disconnects from database. | |
dropColumn ( array $options ) : boolean | カラムを削除する | |
dropSchema ( CakeSchema $schema, string $table = null ) : string | Generate a "drop table" statement for the given Schema object | |
dropTable ( array $options ) : boolean | テーブルを削除する | |
dropTableBySchema ( $options ) : boolean | スキーマファイルからテーブルを削除する | |
execute ( string $sql, array $options = [], array $params = [] ) : mixed | Queries the database with given SQL statement, and obtains some metadata about the result (rows affected, timing, any errors, number of rows in resultset). The query is also logged. | |
expression ( string $expression ) : stdClass | Returns an object to represent a database expression in a query. Expression objects are not sanitized or escaped. | |
fetchAll ( string $sql, array | boolean $params = [], array $options = [] ) : boolean | array | Returns an array of all result rows for a given SQL query. | |
fetchAssociated ( Model $Model, string $query, array $ids ) : array | Fetch 'hasMany' associations. | |
fetchResult ( ) : boolean | Fetches the next row from the current result set | |
fetchRow ( string $sql = null ) : array | Returns a row from current resultset as an array | |
fetchVirtualField ( &$result ) : void | Modifies $result array to place virtual fields in model entry where they belongs to | |
field ( string $name, string $sql ) : mixed | Returns a single field of the first of query results for a given SQL query, or false if empty. | |
fields ( Model $Model, string $alias = null, mixed $fields = [], boolean $quote = true ) : array | Generates the fields list of an SQL query. | |
flushMethodCache ( ) : void | Empties the method caches. | |
fullTableName ( Model | string $model, boolean $quote = true, boolean $schema = true ) : string | Gets full table name including prefix | |
generateAssociationQuery ( Model $Model, Model | null $LinkModel, string $type, string $association, array $assocData, &$queryData, boolean $external ) : mixed | Generates a query or part of a query from a single model or two associated models. | |
getConnection ( ) : PDO | Get the underlying connection object. | |
getConstraint ( string $type, Model $Model, Model $LinkModel, string $association, array $assocData, string $association2 = null ) : array | Returns a conditions array for the constraint between two models. | |
getLog ( boolean $sorted = false, boolean $clear = true ) : array | Get the query log as an array. | |
getQueryCache ( string $sql, array $params = [] ) : mixed | Returns the result for a sql query if it is already cached | |
getVersion ( ) : string | Gets the version string of the database server | |
group ( string | array $fields, Model $Model = null ) : string | Create a GROUP BY SQL clause. | |
hasAny ( Model $Model, string $sql ) : boolean | Checks if the specified table contains any record matching specified SQL | |
hasResult ( ) : boolean | Checks if the result is valid | |
identifier ( string $identifier ) : stdClass | Returns an object to represent a database identifier in a query. Expression objects are not sanitized or escaped. | |
index ( string $model ) : array | Returns an array of the indexes in given datasource name. | |
insertMulti ( string $table, array $fields, array $values ) : boolean | Inserts multiple values into a table | |
introspectType ( string $value ) : string | Guesses the data type of an array | |
isConnected ( ) : boolean | Checks if the source is connected to the database. | |
lastAffected ( mixed $source = null ) : integer | Returns number of affected rows in previous database operation. If no previous operation exists, this returns false. | |
lastError ( PDOStatement $query = null ) : string | Returns a formatted error message from previous database operation. | |
lastInsertId ( mixed $source = null ) : mixed | Returns the ID generated from the previous INSERT operation. | |
lastNumRows ( mixed $source = null ) : integer | Returns number of rows in previous resultset. If no previous resultset exists, this returns false. | |
length ( string $real ) : mixed | Gets the length of a database-native column description, or null if no length | |
limit ( integer $limit, integer $offset = null ) : string | Returns a limit statement in the correct format for the particular database. | |
loadCsv ( array $options ) : boolean | CSVファイルをDBに読み込む | |
loadCsvToArray ( string $path, $encoding ) : mixed | CSVよりデータを配列として読み込む | |
loadSchema ( array $options ) : boolean | スキーマファイルを利用してテーブルを生成する | |
logQuery ( string $sql, array $params = [] ) : void | Log given SQL query. | |
name ( mixed $data ) : string | Returns a quoted name of $data for use in an SQL statement. | |
nestedTransactionSupported ( ) : boolean | Check if the server support nested transactions | |
order ( array | string $keys, string $direction = 'ASC', Model $Model = null ) : string | Returns an ORDER BY clause as a string. | |
prepareFields ( Model $Model, array $queryData ) : array | Prepares fields required by an SQL statement. | |
query ( ) : resource | DataSource Query abstraction | |
queryAssociation ( Model $Model, Model $LinkModel, string $type, string $association, array $assocData, &$queryData, boolean $external, &$resultSet, integer $recursive, array $stack ) : mixed | Queries associations. | |
rawQuery ( string $sql, array $params = [] ) : boolean | Executes given SQL statement. | |
read ( Model $Model, array $queryData = [], integer $recursive = null ) : mixed | The "R" in CRUD | |
readSchema ( string $table, $options = [] ) : array | データベースよりスキーマ情報を読み込む | |
readTableParameters ( string $name ) : array | Read additional table parameters | |
reconnect ( array $config = [] ) : boolean | Reconnects to database server with optional new settings | |
renameColumn ( array $options ) : boolean | カラム名を変更する | |
renameTable ( array $options ) : boolean | テーブル名をリネームする | |
renderJoinStatement ( array $data ) : string | Renders a final SQL JOIN statement | |
renderStatement ( string $type, array $data ) : string | Renders a final SQL statement by putting together the component parts in the correct order | |
resetSequence ( string $table, string $column ) : boolean | void | Reset a sequence based on the MAX() value of $column. Useful for resetting sequences after using insertMulti(). | |
resolveKey ( Model $Model, string $key, string $assoc = null ) : string | Returns a key formatted like a string Model.fieldname(i.e. Post.title, or Country.name) | |
rollback ( ) : boolean | Rollback a transaction | |
showLog ( boolean $sorted = false ) : void | Outputs the contents of the queries log. If in a non-CLI environment the sql_log element will be rendered and output. If in a CLI environment, a plain text log is generated. | |
truncate ( Model | string $table ) : boolean | Deletes all the records in a table and resets the count of the auto-incrementing primary key, where applicable. | |
update ( Model $Model, array $fields = [], array $values = null, mixed $conditions = null ) : boolean | Generates and executes an SQL UPDATE statement for given model, fields, and values. | |
value ( string $data, string $column = null ) : string | Returns a quoted and escaped string of $data for use in an SQL statement. | |
writeCsv ( array $options ) : boolean | DBのデータをCSVファイルとして書きだす | |
writeCurrentSchema ( string $filename ) : boolean | 現在の接続のスキーマを生成する | |
writeSchema ( $options ) : mixed | モデル名を指定してスキーマファイルを生成する |
메소드 | 설명 | |
---|---|---|
_beginNested ( ) : boolean | Begin a nested transaction | |
_buildFieldParameters ( string $columnString, array $columnData, string $position ) : string | Build the field parameters, in a position | |
_commitNested ( ) : boolean | Commit a nested transaction | |
_constructVirtualFields ( Model $Model, string $alias, array $fields ) : array | Converts model virtual fields into sql expressions to be fetched later | |
_convertFieldToCsv ( string $value, boolean $dc = true ) : string | CSV用のフィールドデータに変換する | |
_convertRecordToCsv ( array $record ) : array | CSV用のレコードデータに変換する | |
_dbEncToPhp ( string $enc ) : string | DB用エンコーディング名称をPHP用エンコーディング名称に変換する | |
_dropTable ( type $table ) : string | Generate a "drop table" statement for a single table | |
_execute ( string $sql, array $params = [], array $prepareOptions = [] ) : mixed | Executes given SQL statement. | |
_fetchHasAndBelongsToMany ( Model $Model, string $query, array $ids, string $association ) : array | Fetch 'hasAndBelongsToMany' associations. | |
_fetchHasMany ( Model $Model, string $query, array $ids ) : array | Fetch 'hasMany' associations. | |
_filterResults ( &$resultSet, Model $Model, array $filtered = [] ) : array | Passes association results through afterFind filters of the corresponding model. | |
_getJoins ( Model $Model ) : array | Returns an array of SQL JOIN conditions from a model's associations. | |
_matchRecords ( Model $Model, mixed $conditions = null ) : array | Gets a list of record IDs for the given conditions. Used for multi-record updates and deletes in databases that do not support aliases in UPDATE/DELETE queries. | |
_mergeAssociation ( &$data, &$merge, string $association, string $type, boolean $selfJoin = false ) : void | Merge association of merge into data | |
_mergeConditions ( mixed $query, mixed $assoc ) : array | Merges a mixed set of string/array conditions. | |
_mergeHasMany ( &$resultSet, array $assocResultSet, string $association, Model $Model ) : void | Merge the results of 'hasMany' associations. | |
_parseKey ( string $key, mixed $value, Model $Model = null ) : string | Extracts a Model.field identifier and an SQL condition operator from a string, formats and inserts values, and composes them into an SQL snippet. | |
_phpEncToDb ( string $enc ) : string | PHP用エンコーディング名称をDB用のエンコーディング名称に変換する | |
_prepareUpdateFields ( Model $Model, array $fields, boolean $quoteValues = true, boolean $alias = false ) : array | Quotes and prepares fields and values for an SQL UPDATE statement | |
_quoteFields ( string $conditions ) : string | Quotes Model.fields | |
_quoteMatchedField ( string $match ) : string | Auxiliary function to quote matches Model.fields from a preg_replace_callback call | |
_rollbackNested ( ) : boolean | Rollback a nested transaction | |
_scrubQueryData ( array $data ) : array | Private helper method to remove query metadata in given data array. | |
_writeQueryCache ( string $sql, mixed $data, array $params = [] ) : void | Writes a new key for the in memory sql query cache |
public __construct ( array $config = null, boolean $autoConnect = true ) | ||
$config | array | Array of configuration information for the Datasource. |
$autoConnect | boolean | Whether or not the datasource should automatically connect. |
public __destruct ( ) |
protected _buildFieldParameters ( string $columnString, array $columnData, string $position ) : string | ||
$columnString | string | The partially built column string |
$columnData | array | The array of column data. |
$position | string | The position type to use. 'beforeDefault' or 'afterDefault' are common |
리턴 | string | a built column with the field parameters added. |
protected _commitNested ( ) : boolean | ||
리턴 | boolean |
protected _convertRecordToCsv ( array $record ) : array | ||
$record | array | |
리턴 | array |
protected _dbEncToPhp ( string $enc ) : string | ||
$enc | string | |
리턴 | string |
protected _dropTable ( type $table ) : string | ||
$table | type | Name of the table to drop |
리턴 | string | Drop table SQL statement |
protected _execute ( string $sql, array $params = [], array $prepareOptions = [] ) : mixed | ||
$sql | string | SQL statement |
$params | array | list of params to be bound to query |
$prepareOptions | array | Options to be used in the prepare statement |
리턴 | mixed | PDOStatement if query executes with no problem, true as the result of a successful, false on error query returning no rows, such as a CREATE statement, false otherwise |
protected _filterResults ( &$resultSet, Model $Model, array $filtered = [] ) : array | ||
$Model | Model | Instance of model to operate against. |
$filtered | array | List of classes already filtered, to be skipped. |
리턴 | array | Array of results that have been filtered through $Model->afterFind. |
protected _matchRecords ( Model $Model, mixed $conditions = null ) : array | ||
$Model | Model | The model to find matching records for. |
$conditions | mixed | The conditions to match against. |
리턴 | array | List of record IDs |
protected _phpEncToDb ( string $enc ) : string | ||
$enc | string | |
리턴 | string |
protected _prepareUpdateFields ( Model $Model, array $fields, boolean $quoteValues = true, boolean $alias = false ) : array | ||
$Model | Model | The model to prepare fields for. |
$fields | array | The fields to update. |
$quoteValues | boolean | If values should be quoted, or treated as SQL snippets |
$alias | boolean | Include the model alias in the field name |
리턴 | array | Fields and values, quoted and prepared |
protected _quoteFields ( string $conditions ) : string | ||
$conditions | string | The conditions to quote. |
리턴 | string | or false if no match |
protected _quoteMatchedField ( string $match ) : string | ||
$match | string | matched string |
리턴 | string | quoted string |
protected _rollbackNested ( ) : boolean | ||
리턴 | boolean |
protected _scrubQueryData ( array $data ) : array | ||
$data | array | The data to scrub. |
리턴 | array |
public alterTable ( array $options ) : boolean | ||
$options | array | [ new / old ] |
리턴 | boolean |
public alterTableBySchema ( array $options ) : boolean | ||
$options | array | [ oldPath / newPath ] |
리턴 | boolean |
public buildAssociationQuery ( Model $Model, array $queryData ) : string | ||
$Model | Model | The model to build an association query for. |
$queryData | array | An array of queryData information containing keys similar to Model::find(). |
리턴 | string | String containing an SQL statement. |
public buildColumn ( array $column ) : string | ||
$column | array | An array structured like the following: array('name' => 'value', 'type' => 'value'[, options]), where options can be 'default', 'length', or 'key'. |
리턴 | string |
public buildJoinStatement ( array $join ) : string | ||
$join | array | An array defining a JOIN condition in a query. |
리턴 | string | An SQL JOIN condition to be used in a query. |
public buildStatement ( array $query, Model $Model ) : string | ||
$query | array | An array defining an SQL query. |
$Model | Model | The model object which initiated the query. |
리턴 | string | An executable SQL statement. |
public calculate ( Model $Model, string $func, array $params = [] ) : string | ||
$Model | Model | The model to get a calculated field for. |
$func | string | Lowercase name of SQL function, i.e. 'count' or 'max' |
$params | array | Function parameters (any values must be quoted manually) |
리턴 | string | An SQL calculation function |
public changeColumn ( array $options ) : boolean | ||
$options | array | [ table / column / field ] |
리턴 | boolean |
public conditions ( mixed $conditions, boolean $quoteValues = true, boolean $where = true, Model $Model = null ) : string | ||
$conditions | mixed | Array or string of conditions, or any value. |
$quoteValues | boolean | If true, values should be quoted |
$where | boolean | If true, "WHERE " will be prepended to the return value |
$Model | Model | A reference to the Model instance making the query |
리턴 | string | SQL fragment |
public create ( Model $Model, array $fields = null, array $values = null ) : boolean | ||
$Model | Model | Model object that the record is for. |
$fields | array | An array of field names to insert. If null, $Model->data will be used to generate field names. |
$values | array | An array of values with keys matching the fields. If null, $Model->data will be used to generate values. |
리턴 | boolean | Success |
public createSchema ( CakeSchema $schema, string $tableName = null ) : string | ||
$schema | CakeSchema | An instance of a subclass of CakeSchema |
$tableName | string | Optional. If specified only the table name given will be generated. Otherwise, all tables defined in the schema are generated. |
리턴 | string |
public createTable ( array $options ) : boolean | ||
$options | array | [ schema / table ] |
리턴 | boolean |
public createTableBySchema ( array $options ) : boolean | ||
$options | array | [ path ] |
리턴 | boolean |
public defaultConditions ( Model $Model, string | array | boolean $conditions, boolean $useAlias = true ) : mixed | ||
$Model | Model | The model to get conditions for. |
$conditions | string | array | boolean | Array of conditions, conditions string, null or false. If an array of conditions, or string conditions those conditions will be returned. With other values the model's existence will be checked. If the model doesn't exist a null or false will be returned depending on the input value. |
$useAlias | boolean | Use model aliases rather than table names when generating conditions |
리턴 | mixed | Either null, false, $conditions or an array of default conditions to use. |
public disconnect ( ) : boolean | ||
리턴 | boolean | Always true |
public dropColumn ( array $options ) : boolean | ||
$options | array | [ table / field ] |
리턴 | boolean |
public dropSchema ( CakeSchema $schema, string $table = null ) : string | ||
$schema | CakeSchema | An instance of a subclass of CakeSchema |
$table | string | Optional. If specified only the table name given will be generated. Otherwise, all tables defined in the schema are generated. |
리턴 | string |
public dropTableBySchema ( $options ) : boolean | ||
리턴 | boolean |
public expression ( string $expression ) : stdClass | ||
$expression | string | An arbitrary SQL expression to be inserted into a query. |
리턴 | stdClass | An object representing a database expression to be used in a query |
public fetchAll ( string $sql, array | boolean $params = [], array $options = [] ) : boolean | array | ||
$sql | string | SQL statement |
$params | array | boolean | Either parameters to be bound as values for the SQL statement, or a boolean to control query caching. |
$options | array | additional options for the query. |
리턴 | boolean | array | Array of resultset rows, or false if no rows matched |
public fetchResult ( ) : boolean | ||
리턴 | boolean |
public fetchVirtualField ( &$result ) : void | ||
리턴 | void |
public flushMethodCache ( ) : void | ||
리턴 | void |
public fullTableName ( Model | string $model, boolean $quote = true, boolean $schema = true ) : string | ||
$model | Model | string | Either a Model object or a string table name. |
$quote | boolean | Whether you want the table name quoted. |
$schema | boolean | Whether you want the schema name included. |
리턴 | string | Full quoted table name |
public generateAssociationQuery ( Model $Model, Model | null $LinkModel, string $type, string $association, array $assocData, &$queryData, boolean $external ) : mixed | ||
$Model | Model | Primary Model object. |
$LinkModel | Model | null | Linked model object. |
$type | string | Association type, one of the model association types ie. hasMany. |
$association | string | Association name. |
$assocData | array | Association data. |
$external | boolean | Whether or not the association query is on an external datasource. |
리턴 | mixed | String representing a query. True, when $external is false and association $type is 'hasOne' or 'belongsTo'. |
public getConstraint ( string $type, Model $Model, Model $LinkModel, string $association, array $assocData, string $association2 = null ) : array | ||
$type | string | Association type. |
$Model | Model | Primary Model object. |
$LinkModel | Model | Linked model object. |
$association | string | Association name. |
$assocData | array | Association data. |
$association2 | string | HABTM association name. |
리턴 | array | Conditions array defining the constraint between $Model and $LinkModel. |
public getVersion ( ) : string | ||
리턴 | string | The database version |
public identifier ( string $identifier ) : stdClass | ||
$identifier | string | A SQL expression to be used as an identifier |
리턴 | stdClass | An object representing a database identifier to be used in a query |
public insertMulti ( string $table, array $fields, array $values ) : boolean | ||
$table | string | The table being inserted into. |
$fields | array | The array of field/column names being inserted. |
$values | array | The array of values to insert. The values should be an array of rows. Each row should have values keyed by the column name. Each row must have the values in the same order as $fields. |
리턴 | boolean |
public introspectType ( string $value ) : string | ||
$value | string | The value to introspect for type data. |
리턴 | string |
public isConnected ( ) : boolean | ||
리턴 | boolean | True if the database is connected, else false |
public lastAffected ( mixed $source = null ) : integer | ||
$source | mixed | The source to check. |
리턴 | integer | Number of affected rows |
public lastInsertId ( mixed $source = null ) : mixed | ||
$source | mixed | The source to get an id for. |
리턴 | mixed |
public lastNumRows ( mixed $source = null ) : integer | ||
$source | mixed | Not used |
리턴 | integer | Number of rows in resultset |
public loadCsvToArray ( string $path, $encoding ) : mixed | ||
$path | string | |
리턴 | mixed | boolean Or array |
public loadSchema ( array $options ) : boolean | ||
$options | array | path は必須 |
리턴 | boolean |
public nestedTransactionSupported ( ) : boolean | ||
리턴 | boolean |
public prepareFields ( Model $Model, array $queryData ) : array | ||
$Model | Model | The model to prepare. |
$queryData | array | An array of queryData information containing keys similar to Model::find(). |
리턴 | array | Array containing SQL fields. |
public query ( ) : resource | ||
리턴 | resource | Result resource identifier. |
public queryAssociation ( Model $Model, Model $LinkModel, string $type, string $association, array $assocData, &$queryData, boolean $external, &$resultSet, integer $recursive, array $stack ) : mixed | ||
$Model | Model | Primary Model object. |
$LinkModel | Model | Linked model object. |
$type | string | Association type, one of the model association types ie. hasMany. |
$association | string | Association name. |
$assocData | array | Association data. |
$external | boolean | Whether or not the association query is on an external datasource. |
$recursive | integer | Number of levels of association. |
$stack | array | A list with joined models. |
리턴 | mixed |
public read ( Model $Model, array $queryData = [], integer $recursive = null ) : mixed | ||
$Model | Model | A Model object that the query is for. |
$queryData | array | An array of queryData information containing keys similar to Model::find(). |
$recursive | integer | Number of levels of association |
리턴 | mixed | boolean false on error/failure. An array of results on success. |
public readSchema ( string $table, $options = [] ) : array | ||
$table | string | |
리턴 | array | $schema |
public readTableParameters ( string $name ) : array | ||
$name | string | The table name to read. |
리턴 | array |
public renameColumn ( array $options ) : boolean | ||
$options | array | [ table / new / old ] |
리턴 | boolean |
public renameTable ( array $options ) : boolean | ||
$options | array | [ old / new ] |
리턴 | boolean |
public renderJoinStatement ( array $data ) : string | ||
$data | array | The data to generate a join statement for. |
리턴 | string |
public update ( Model $Model, array $fields = [], array $values = null, mixed $conditions = null ) : boolean | ||
$Model | Model | The model to update. |
$fields | array | The fields to update |
$values | array | The values fo the fields. |
$conditions | mixed | The conditions for the update. When non-empty $values will not be quoted. |
리턴 | boolean | Success |
public writeCurrentSchema ( string $filename ) : boolean | ||
$filename | string | 保存先のフルパス |
리턴 | boolean |
public writeSchema ( $options ) : mixed | ||
리턴 | mixed | スキーマファイルの内容 Or false |
protected array $_connection | ||
리턴 | array |
protected bool $_methodCacheChange | ||
리턴 | boolean |
protected array $_queriesLog | ||
리턴 | array |
protected int $_queriesLogMax | ||
리턴 | integer |
protected array $_queryCache | ||
리턴 | array |
protected array $_queryDefaults | ||
리턴 | array |
protected array $_sqlOps | ||
리턴 | array |
protected int $_transactionNesting | ||
리턴 | integer |
public string $affected | ||
리턴 | string |
public string $alias | ||
리턴 | string |
public bool $cacheMethods | ||
리턴 | boolean |
public string $configKeyName | ||
리턴 | string |
public string $description | ||
리턴 | string |
public string $endQuote | ||
리턴 | string |
public array $fieldParameters | ||
리턴 | array |
public array $index | ||
리턴 | array |
public static array $methodCache | ||
리턴 | array |
public string $startQuote | ||
리턴 | string |
public array $tableParameters | ||
리턴 | array |
public bool $useNestedTransactions | ||
리턴 | boolean |
public string $virtualFieldSeparator | ||
리턴 | string |