PHP Class Ruckusing_Adapter_Sqlite3_Base, ruckusing-migrations

Inheritance: extends Ruckusing_Adapter_Base, implements Ruckusing_Adapter_Interface
ファイルを表示 Open project: ruckus/ruckusing-migrations Class Usage Examples

Public Methods

Method Description
__construct ( array $dsn, $logger )
add_column ( string $table_name, string $column_name, string $type, array $options = [] ) : boolean
add_column_options ( $type, $options, boolean $performing_change = false ) : string
add_index ( string $table_name, string $column_name, array $options = [] ) : boolean
add_timestamps ( $table_name, $created_column_name, $updated_column_name ) : boolean
change_column ( string $table_name, string $column_name, string $type, array $options = [] )
column_definition ( $column_name, $type, null $options = null ) : string
column_info ( $table, $column ) : array | null
commit_transaction ( )
create_database ( $db, array $options = [] ) : boolean
create_schema_version_table ( )
create_table ( string $table_name, array $options = [] ) : Ruckusing_Adapter_Sqlite3_TableDefinition
database_exists ( string $db ) : boolean
drop_database ( string $databaseName ) : boolean
drop_table ( string $table_name ) : boolean
execute ( string $query ) : array | boolean | integer | null
execute_ddl ( $ddl ) : boolean
get_database_name ( ) : mixed
has_index ( $table_name, $column_name, array $options = [] ) : boolean
identifier ( $string ) : string
indexes ( $table_name ) : array
log_unsupported_feature ( $feature )
multi_query ( string $queries ) : boolean Execute several queries
native_database_types ( ) : array
primary_keys ( $table ) : array
query ( string $query ) : array | boolean | integer
quote ( string $value, null $column = null ) : string
quote_column_name ( $string ) : string
quote_string ( string $str ) : string
quote_table_name ( $string ) : string
remove_column ( string $table_name, string $column_name )
remove_index ( string $table_name, string $column_name, array $options = [] ) : boolean
remove_timestamps ( $table_name, $created_column_name, $updated_column_name ) : boolean
remove_version ( $version ) : boolean
rename_column ( string $table_name, string $column_name, string $new_column_name ) : boolean
rename_table ( string $name, string $new_name ) : boolean
rollback_transaction ( )
schema ( $output_file ) : string
select_all ( $query ) : array | boolean | integer
select_one ( $query ) : array
set_current_version ( $version ) : boolean
start_transaction ( )
supports_migrations ( ) : boolean
table_exists ( string $tbl, boolean $reload_tables = false ) : boolean
type_to_sql ( $type, array $options = [] ) : string

Private Methods

Method Description
beginTransaction ( )
commit ( )
connect ( $dsn )
db_connect ( $dsn ) : boolean
determine_query_type ( $query ) : integer
executeQuery ( $query ) : SQLite3Result
extract_column_info ( $pragmaTable, $columnName ) : null
inTransaction ( ) : boolean
isError ( $SQLite3Result ) : boolean
lastErrorMsg ( ) : string
rollback ( )

Method Details

__construct() public method

public __construct ( array $dsn, $logger )
$dsn array
$logger

add_column() public method

public add_column ( string $table_name, string $column_name, string $type, array $options = [] ) : boolean
$table_name string
$column_name string
$type string
$options array
return boolean

add_column_options() public method

public add_column_options ( $type, $options, boolean $performing_change = false ) : string
$type
$options
$performing_change boolean
return string

add_index() public method

public add_index ( string $table_name, string $column_name, array $options = [] ) : boolean
$table_name string
$column_name string
$options array
return boolean

add_timestamps() public method

public add_timestamps ( $table_name, $created_column_name, $updated_column_name ) : boolean
$table_name
$created_column_name
$updated_column_name
return boolean

change_column() public method

public change_column ( string $table_name, string $column_name, string $type, array $options = [] )
$table_name string
$column_name string
$type string
$options array

column_definition() public method

public column_definition ( $column_name, $type, null $options = null ) : string
$column_name
$type
$options null
return string

column_info() public method

public column_info ( $table, $column ) : array | null
$table
$column
return array | null

commit_transaction() public method

public commit_transaction ( )

create_database() public method

public create_database ( $db, array $options = [] ) : boolean
$db
$options array
return boolean

create_schema_version_table() public method

create_table() public method

public create_table ( string $table_name, array $options = [] ) : Ruckusing_Adapter_Sqlite3_TableDefinition
$table_name string
$options array
return Ruckusing_Adapter_Sqlite3_TableDefinition

database_exists() public method

public database_exists ( string $db ) : boolean
$db string
return boolean

drop_database() public method

public drop_database ( string $databaseName ) : boolean
$databaseName string
return boolean

drop_table() public method

public drop_table ( string $table_name ) : boolean
$table_name string
return boolean

execute() public method

public execute ( string $query ) : array | boolean | integer | null
$query string
return array | boolean | integer | null

execute_ddl() public method

public execute_ddl ( $ddl ) : boolean
$ddl
return boolean

get_database_name() public method

public get_database_name ( ) : mixed
return mixed

has_index() public method

public has_index ( $table_name, $column_name, array $options = [] ) : boolean
$table_name
$column_name
$options array
return boolean

identifier() public method

public identifier ( $string ) : string
$string
return string

indexes() public method

public indexes ( $table_name ) : array
$table_name
return array

log_unsupported_feature() public method

public log_unsupported_feature ( $feature )
$feature

multi_query() public method

Execute several queries
public multi_query ( string $queries ) : boolean
$queries string queries to run
return boolean

native_database_types() public method

public native_database_types ( ) : array
return array

primary_keys() public method

public primary_keys ( $table ) : array
$table
return array

query() public method

public query ( string $query ) : array | boolean | integer
$query string
return array | boolean | integer

quote() public method

public quote ( string $value, null $column = null ) : string
$value string
$column null
return string

quote_column_name() public method

public quote_column_name ( $string ) : string
$string
return string

quote_string() public method

public quote_string ( string $str ) : string
$str string
return string

quote_table_name() public method

public quote_table_name ( $string ) : string
$string
return string

remove_column() public method

public remove_column ( string $table_name, string $column_name )
$table_name string
$column_name string

remove_index() public method

public remove_index ( string $table_name, string $column_name, array $options = [] ) : boolean
$table_name string
$column_name string
$options array
return boolean

remove_timestamps() public method

public remove_timestamps ( $table_name, $created_column_name, $updated_column_name ) : boolean
$table_name
$created_column_name
$updated_column_name
return boolean

remove_version() public method

public remove_version ( $version ) : boolean
$version
return boolean

rename_column() public method

public rename_column ( string $table_name, string $column_name, string $new_column_name ) : boolean
$table_name string
$column_name string
$new_column_name string
return boolean

rename_table() public method

public rename_table ( string $name, string $new_name ) : boolean
$name string
$new_name string
return boolean

rollback_transaction() public method

schema() public method

public schema ( $output_file ) : string
$output_file
return string

select_all() public method

public select_all ( $query ) : array | boolean | integer
$query
return array | boolean | integer

select_one() public method

public select_one ( $query ) : array
$query
return array

set_current_version() public method

public set_current_version ( $version ) : boolean
$version
return boolean

start_transaction() public method

public start_transaction ( )

supports_migrations() public method

public supports_migrations ( ) : boolean
return boolean

table_exists() public method

public table_exists ( string $tbl, boolean $reload_tables = false ) : boolean
$tbl string
$reload_tables boolean
return boolean

type_to_sql() public method

public type_to_sql ( $type, array $options = [] ) : string
$type
$options array
return string