PHP Class Ruckusing_Adapter_Sqlite3_Base, ruckusing-migrations

Inheritance: extends Ruckusing_Adapter_Base, implements Ruckusing_Adapter_Interface
Afficher le fichier Open project: ruckus/ruckusing-migrations Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

add_column() public méthode

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

add_column_options() public méthode

public add_column_options ( $type, $options, boolean $performing_change = false ) : string
$type
$options
$performing_change boolean
Résultat string

add_index() public méthode

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

add_timestamps() public méthode

public add_timestamps ( $table_name, $created_column_name, $updated_column_name ) : boolean
$table_name
$created_column_name
$updated_column_name
Résultat boolean

change_column() public méthode

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 méthode

public column_definition ( $column_name, $type, null $options = null ) : string
$column_name
$type
$options null
Résultat string

column_info() public méthode

public column_info ( $table, $column ) : array | null
$table
$column
Résultat array | null

commit_transaction() public méthode

public commit_transaction ( )

create_database() public méthode

public create_database ( $db, array $options = [] ) : boolean
$db
$options array
Résultat boolean

create_schema_version_table() public méthode

create_table() public méthode

public create_table ( string $table_name, array $options = [] ) : Ruckusing_Adapter_Sqlite3_TableDefinition
$table_name string
$options array
Résultat Ruckusing_Adapter_Sqlite3_TableDefinition

database_exists() public méthode

public database_exists ( string $db ) : boolean
$db string
Résultat boolean

drop_database() public méthode

public drop_database ( string $databaseName ) : boolean
$databaseName string
Résultat boolean

drop_table() public méthode

public drop_table ( string $table_name ) : boolean
$table_name string
Résultat boolean

execute() public méthode

public execute ( string $query ) : array | boolean | integer | null
$query string
Résultat array | boolean | integer | null

execute_ddl() public méthode

public execute_ddl ( $ddl ) : boolean
$ddl
Résultat boolean

get_database_name() public méthode

public get_database_name ( ) : mixed
Résultat mixed

has_index() public méthode

public has_index ( $table_name, $column_name, array $options = [] ) : boolean
$table_name
$column_name
$options array
Résultat boolean

identifier() public méthode

public identifier ( $string ) : string
$string
Résultat string

indexes() public méthode

public indexes ( $table_name ) : array
$table_name
Résultat array

log_unsupported_feature() public méthode

public log_unsupported_feature ( $feature )
$feature

multi_query() public méthode

Execute several queries
public multi_query ( string $queries ) : boolean
$queries string queries to run
Résultat boolean

native_database_types() public méthode

public native_database_types ( ) : array
Résultat array

primary_keys() public méthode

public primary_keys ( $table ) : array
$table
Résultat array

query() public méthode

public query ( string $query ) : array | boolean | integer
$query string
Résultat array | boolean | integer

quote() public méthode

public quote ( string $value, null $column = null ) : string
$value string
$column null
Résultat string

quote_column_name() public méthode

public quote_column_name ( $string ) : string
$string
Résultat string

quote_string() public méthode

public quote_string ( string $str ) : string
$str string
Résultat string

quote_table_name() public méthode

public quote_table_name ( $string ) : string
$string
Résultat string

remove_column() public méthode

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

remove_index() public méthode

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

remove_timestamps() public méthode

public remove_timestamps ( $table_name, $created_column_name, $updated_column_name ) : boolean
$table_name
$created_column_name
$updated_column_name
Résultat boolean

remove_version() public méthode

public remove_version ( $version ) : boolean
$version
Résultat boolean

rename_column() public méthode

public rename_column ( string $table_name, string $column_name, string $new_column_name ) : boolean
$table_name string
$column_name string
$new_column_name string
Résultat boolean

rename_table() public méthode

public rename_table ( string $name, string $new_name ) : boolean
$name string
$new_name string
Résultat boolean

rollback_transaction() public méthode

schema() public méthode

public schema ( $output_file ) : string
$output_file
Résultat string

select_all() public méthode

public select_all ( $query ) : array | boolean | integer
$query
Résultat array | boolean | integer

select_one() public méthode

public select_one ( $query ) : array
$query
Résultat array

set_current_version() public méthode

public set_current_version ( $version ) : boolean
$version
Résultat boolean

start_transaction() public méthode

public start_transaction ( )

supports_migrations() public méthode

public supports_migrations ( ) : boolean
Résultat boolean

table_exists() public méthode

public table_exists ( string $tbl, boolean $reload_tables = false ) : boolean
$tbl string
$reload_tables boolean
Résultat boolean

type_to_sql() public méthode

public type_to_sql ( $type, array $options = [] ) : string
$type
$options array
Résultat string