CSqliteCommandBuilder
鍖 | system.db.schema.sqlite |
---|---|
缁ф壙 | class CSqliteCommandBuilder » CDbCommandBuilder » CComponent |
婧愯嚜 | 1.0 |
鐗堟湰 | $Id: CSqliteCommandBuilder.php 3515 2011-12-28 12:29:24Z mdomba $ |
婧愮爜 | framework/db/schema/sqlite/CSqliteCommandBuilder.php |
CSqliteCommandBuilder鎻愪緵涓篠QLite琛ㄥ垱寤烘煡璇㈣鍙ョ殑鍩烘湰鏂规硶銆
鍏叡灞炴
灞炴 | 绫诲瀷 | 鎻忚堪 | 瀹氫箟鍦 |
---|---|---|---|
dbConnection | CDbConnection | database connection. | CDbCommandBuilder |
schema | CDbSchema | the schema for this command builder. | CDbCommandBuilder |
鍏叡鏂规硶
鏂规硶 | 鎻忚堪 | 瀹氫箟鍦 |
---|---|---|
__call() | 濡傛灉绫讳腑娌℃湁璋冪殑鏂规硶鍚嶏紝鍒欒皟鐢ㄨ繖涓柟娉曘 | CComponent |
__construct() | CDbCommandBuilder | |
__get() | 杩斿洖涓涓睘鎬у笺佷竴涓簨浠跺鐞嗙▼搴忓垪琛ㄦ垨涓涓涓哄悕绉般 | CComponent |
__isset() | 妫鏌ヤ竴涓睘鎬ф槸鍚︿负null銆 | CComponent |
__set() | 璁剧疆涓涓粍浠剁殑灞炴у笺 | CComponent |
__unset() | 璁剧疆涓涓粍浠剁殑灞炴т负null銆 | CComponent |
applyCondition() | Alters the SQL to apply WHERE clause. | CDbCommandBuilder |
applyGroup() | Alters the SQL to apply GROUP BY. | CDbCommandBuilder |
applyHaving() | Alters the SQL to apply HAVING. | CDbCommandBuilder |
applyJoin() | Alters the SQL to apply JOIN clause. | CDbCommandBuilder |
applyLimit() | Alters the SQL to apply LIMIT and OFFSET. | CDbCommandBuilder |
applyOrder() | Alters the SQL to apply ORDER BY. | CDbCommandBuilder |
asa() | 杩斿洖杩欎釜鍚嶅瓧鐨勮涓哄璞° | CComponent |
attachBehavior() | 闄勫姞涓涓涓哄埌缁勪欢銆 | CComponent |
attachBehaviors() | 闄勫姞涓涓涓哄垪琛ㄥ埌缁勪欢銆 | CComponent |
attachEventHandler() | 涓轰簨浠堕檮鍔犱竴涓簨浠跺鐞嗙▼搴忋 | CComponent |
bindValues() | Binds parameter values for an SQL command. | CDbCommandBuilder |
canGetProperty() | 纭畾灞炴ф槸鍚﹀彲璇汇 | CComponent |
canSetProperty() | 纭畾灞炴ф槸鍚﹀彲鍐欍 | CComponent |
createColumnCriteria() | Creates a query criteria with the specified column values. | CDbCommandBuilder |
createCountCommand() | Creates a COUNT(*) command for a single table. | CDbCommandBuilder |
createCriteria() | Creates a query criteria. | CDbCommandBuilder |
createDeleteCommand() | Creates a DELETE command. | CDbCommandBuilder |
createFindCommand() | Creates a SELECT command for a single table. | CDbCommandBuilder |
createInCondition() | Generates the expression for selecting rows of specified primary key values. | CDbCommandBuilder |
createInsertCommand() | Creates an INSERT command. | CDbCommandBuilder |
createPkCondition() | Generates the expression for selecting rows of specified primary key values. | CDbCommandBuilder |
createPkCriteria() | Creates a query criteria with the specified primary key. | CDbCommandBuilder |
createSearchCondition() | Generates the expression for searching the specified keywords within a list of columns. | CDbCommandBuilder |
createSqlCommand() | Creates a command based on a given SQL statement. | CDbCommandBuilder |
createUpdateCommand() | Creates an UPDATE command. | CDbCommandBuilder |
createUpdateCounterCommand() | Creates an UPDATE command that increments/decrements certain columns. | CDbCommandBuilder |
detachBehavior() | 浠庣粍浠朵腑鍒嗙涓涓涓恒 | CComponent |
detachBehaviors() | 浠庣粍浠朵腑鍒嗙鎵鏈夎涓恒 | CComponent |
detachEventHandler() | 鍒嗙涓涓瓨鍦ㄧ殑浜嬩欢澶勭悊绋嬪簭銆 | CComponent |
disableBehavior() | 绂佺敤涓涓檮鍔犺涓恒 | CComponent |
disableBehaviors() | 绂佺敤缁勪欢闄勫姞鐨勬墍鏈夎涓恒 | CComponent |
enableBehavior() | 鍚敤涓涓檮鍔犺涓恒 | CComponent |
enableBehaviors() | 鍚敤缁勪欢闄勫姞鐨勬墍鏈夎涓恒 | CComponent |
evaluateExpression() | 璁$畻涓涓狿HP琛ㄨ揪寮忥紝鎴栨牴鎹粍浠朵笂涓嬫枃鎵ц鍥炶皟銆 | CComponent |
getDbConnection() | 杩斿洖database connection. | CDbCommandBuilder |
getEventHandlers() | 杩斿洖涓涓簨浠剁殑闄勫姞澶勭悊绋嬪簭鍒楄〃銆 | CComponent |
getLastInsertID() | Returns the last insertion ID for the specified table. | CDbCommandBuilder |
getSchema() | 杩斿洖the schema for this command builder. | CDbCommandBuilder |
hasEvent() | 纭畾涓涓簨浠舵槸鍚﹀畾涔夈 | CComponent |
hasEventHandler() | 妫鏌ヤ簨浠舵槸鍚︽湁闄勫姞鐨勫鐞嗙▼搴忋 | CComponent |
hasProperty() | 纭畾灞炴ф槸鍚﹁瀹氫箟銆 | CComponent |
raiseEvent() | 鍙戣捣涓涓簨浠躲 | CComponent |
鍙椾繚鎶ゆ柟娉
鏂规硶 | 鎻忚堪 | 瀹氫箟鍦 |
---|---|---|
createCompositeInCondition() | 鐢熸垚鏍规嵁鎸囧畾绗﹀悎閿夋嫨琛岀殑琛ㄨ揪寮忋 | CSqliteCommandBuilder |
ensureTable() | Checks if the parameter is a valid table schema. | CDbCommandBuilder |
鏂规硶璇︾粏
createCompositeInCondition()
鏂规硶
protected string createCompositeInCondition(CDbTableSchema $table, array $values, string $prefix)
| ||
$table | CDbTableSchema | 琛╯chema |
$values | array | 瑕侀夋嫨鐨勪富閿煎垪琛 |
$prefix | string | 鍒楀墠缂锛堜互.缁撴潫锛 |
{return} | string | 閫夋嫨鐨勮〃杈惧紡 |
婧愮爜锛 framework/db/schema/sqlite/CSqliteCommandBuilder.php#30 (鏄剧ず)
protected function createCompositeInCondition($table,$values,$prefix)
{
$keyNames=array();
foreach(array_keys($values[0]) as $name)
$keyNames[]=$prefix.$table->columns[$name]->rawName;
$vs=array();
foreach($values as $value)
$vs[]=implode("||','||",$value);
return implode("||','||",$keyNames).' IN ('.implode(', ',$vs).')';
}
鐢熸垚鏍规嵁鎸囧畾绗﹀悎閿夋嫨琛岀殑琛ㄨ揪寮忋 璇ユ柟娉曡閲嶅啓浜嗭紝鍥犱负SQLite涓嶆敮鎸 甯︽湁澶嶅悎鍒楃殑榛樿IN琛ㄨ揪寮忋