Yii Framework v1.1.10 绫诲弬鑰

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琛ㄨ揪寮忋

Copyright © 2008-2011 by Yii Software LLC
All Rights Reserved.