Class yii\db\oci\Command

继承yii\db\oci\Command » yii\db\Command » yii\base\Component » yii\base\BaseObject
实现yii\base\Configurable
可用自版本2.0.33
源代码 https://github.com/yiisoft/yii2/blob/master/framework/db/oci/Command.php

Command represents an Oracle SQL statement to be executed against a database.

{@inheritdoc}

公共属性

隐藏继承的属性

属性类型描述定义在
$behaviors yii\base\Behavior[] 附加到此组件的行为列表. 该属性是只读的. yii\base\Component
$db yii\db\Connection The DB connection that this command is associated with yii\db\Command
$fetchMode integer The default fetch mode for this command. yii\db\Command
$params array The parameters (name => value) that are bound to the current PDO statement. yii\db\Command
$pdoStatement PDOStatement The PDOStatement object that this command is associated with yii\db\Command
$queryCacheDependency yii\caching\Dependency The dependency to be associated with the cached query result for this command yii\db\Command
$queryCacheDuration integer The default number of seconds that query results can remain valid in cache. yii\db\Command
$rawSql string The raw SQL with parameter values inserted into the corresponding placeholders in $sql. yii\db\Command
$sql string The SQL statement to be executed. yii\db\Command

受保护的属性

隐藏继承的属性

属性类型描述定义在
$pendingParams array Pending parameters to be bound to the current PDO statement. yii\db\Command

公共方法

隐藏继承的方法

方法描述定义在
__call() 调用不是类方法的指定的方法. yii\base\Component
__clone() 在通过克隆现有对象创建对象之后调用此方法. yii\base\Component
__construct() 构造函数. yii\base\BaseObject
__get() 返回组件属性的值. yii\base\Component
__isset() 检查属性是否已设置, 即已定义且不为null. yii\base\Component
__set() 设置组件属性的值. yii\base\Component
__unset() 将组件属性设置为null. yii\base\Component
addCheck() Creates a SQL command for adding a check constraint to an existing table. yii\db\Command
addColumn() Creates a SQL command for adding a new DB column. yii\db\Command
addCommentOnColumn() Builds a SQL command for adding comment to column. yii\db\Command
addCommentOnTable() Builds a SQL command for adding comment to table. yii\db\Command
addDefaultValue() Creates a SQL command for adding a default value constraint to an existing table. yii\db\Command
addForeignKey() Creates a SQL command for adding a foreign key constraint to an existing table. yii\db\Command
addPrimaryKey() Creates a SQL command for adding a primary key constraint to an existing table. yii\db\Command
addUnique() Creates a SQL command for adding an unique constraint to an existing table. yii\db\Command
alterColumn() Creates a SQL command for changing the definition of a column. yii\db\Command
attachBehavior() 将行为附加到此组件. yii\base\Component
attachBehaviors() 将行为列表附加到组件. yii\base\Component
batchInsert() Creates a batch INSERT command. yii\db\Command
behaviors() 返回此组件应该具有的行为列表. yii\base\Component
bindParam() Binds a parameter to the SQL statement to be executed. yii\db\Command
bindValue() Binds a value to a parameter. yii\db\Command
bindValues() Binds a list of values to the corresponding parameters. yii\db\Command
cache() Enables query cache for this command. yii\db\Command
canGetProperty() 返回一个值, 指示属性是否可读取. yii\base\Component
canSetProperty() 返回一个值, 指示属性是否可设置. yii\base\Component
cancel() Cancels the execution of the SQL statement. yii\db\Command
checkIntegrity() Builds a SQL command for enabling or disabling integrity check. yii\db\Command
className() 返回此类的完全限定名称. yii\base\BaseObject
createIndex() Creates a SQL command for creating a new index. yii\db\Command
createTable() Creates a SQL command for creating a new DB table. yii\db\Command
createView() Creates a SQL View. yii\db\Command
delete() Creates a DELETE command. yii\db\Command
detachBehavior() 从组件中分离一个行为. yii\base\Component
detachBehaviors() 分离组件中的所有行为. yii\base\Component
dropCheck() Creates a SQL command for dropping a check constraint. yii\db\Command
dropColumn() Creates a SQL command for dropping a DB column. yii\db\Command
dropCommentFromColumn() Builds a SQL command for dropping comment from column. yii\db\Command
dropCommentFromTable() Builds a SQL command for dropping comment from table. yii\db\Command
dropDefaultValue() Creates a SQL command for dropping a default value constraint. yii\db\Command
dropForeignKey() Creates a SQL command for dropping a foreign key constraint. yii\db\Command
dropIndex() Creates a SQL command for dropping an index. yii\db\Command
dropPrimaryKey() Creates a SQL command for removing a primary key constraint to an existing table. yii\db\Command
dropTable() Creates a SQL command for dropping a DB table. yii\db\Command
dropUnique() Creates a SQL command for dropping an unique constraint. yii\db\Command
dropView() Drops a SQL View. yii\db\Command
ensureBehaviors() 确保在 behaviors() 中声明的行为已附加到此组件. yii\base\Component
execute() Executes the SQL statement. yii\db\Command
executeResetSequence() Executes a db command resetting the sequence value of a table's primary key. yii\db\Command
getBehavior() 返回指定的行为对象. yii\base\Component
getBehaviors() 返回附加到此组件的所有行为. yii\base\Component
getRawSql() Returns the raw SQL by inserting parameter values into the corresponding placeholders in $sql. yii\db\Command
getSql() Returns the SQL statement for this command. yii\db\Command
hasEventHandlers() 返回一个值, 指示是否有任何处理程序附加到指定的事件. yii\base\Component
hasMethod() 返回一个值, 指示方法是否已定义. yii\base\Component
hasProperty() 返回一个值, 指示属性是否已定义. yii\base\Component
init() 初始化对象. yii\base\BaseObject
insert() Creates an INSERT command. yii\db\Command
noCache() Disables query cache for this command. yii\db\Command
off() 从该组件分离现有的事件处理程序. yii\base\Component
on() 将事件处理程序附加到事件. yii\base\Component
prepare() Prepares the SQL statement to be executed. yii\db\Command
query() Executes the SQL statement and returns query result. yii\db\Command
queryAll() Executes the SQL statement and returns ALL rows at once. yii\db\Command
queryColumn() Executes the SQL statement and returns the first column of the result. yii\db\Command
queryOne() Executes the SQL statement and returns the first row of the result. yii\db\Command
queryScalar() Executes the SQL statement and returns the value of the first column in the first row of data. yii\db\Command
renameColumn() Creates a SQL command for renaming a column. yii\db\Command
renameTable() Creates a SQL command for renaming a DB table. yii\db\Command
resetSequence() Creates a SQL command for resetting the sequence value of a table's primary key. yii\db\Command
setRawSql() Specifies the SQL statement to be executed. The SQL statement will not be modified in any way. yii\db\Command
setSql() Specifies the SQL statement to be executed. The SQL statement will be quoted using yii\db\Connection::quoteSql(). yii\db\Command
trigger() 触发事件. yii\base\Component
truncateTable() Creates a SQL command for truncating a DB table. yii\db\Command
update() Creates an UPDATE command. yii\db\Command
upsert() Creates a command to insert rows into a database table if they do not already exist (matching unique constraints), or update them if they do. yii\db\Command

受保护的方法

隐藏继承的方法

方法描述定义在
bindPendingParams() Binds pending parameters that were registered via bindValue() and bindValues(). yii\db\oci\Command
getCacheKey() Returns the cache key for the query. yii\db\Command
internalExecute() Executes a prepared statement. yii\db\Command
logQuery() Logs the current database query if query logging is enabled and returns the profiling token if profiling is enabled. yii\db\Command
queryInternal() Performs the actual DB query of a SQL statement. yii\db\Command
refreshTableSchema() Refreshes table schema, which was marked by requireTableSchemaRefresh(). yii\db\Command
requireTableSchemaRefresh() Marks a specified table schema to be refreshed after command execution. yii\db\Command
requireTransaction() Marks the command to be executed in transaction. yii\db\Command
reset() Resets command properties to their initial state. yii\db\Command
setRetryHandler() Sets a callable (e.g. anonymous function) that is called when yii\db\Exception is thrown when executing the command. The signature of the callable should be: yii\db\Command

方法详情

bindPendingParams() protected 方法

Binds pending parameters that were registered via bindValue() and bindValues().

Note that this method requires an active $pdoStatement.

protected void bindPendingParams ( )