Method |
Description |
|
__construct ( array $dsn, Ruckusing_Util_Logger $logger ) : Ruckusing_Adapter_PgSQL_Base |
Creates an instance of Ruckusing_Adapter_PgSQL_Base |
|
__toString ( ) : string |
Return a message displaying the current version |
|
add_column ( string $table_name, string $column_name, string $type, array $options = [] ) : boolean |
Add a column |
|
add_column_options ( string $type, array $options, boolean $performing_change = false ) : string |
Add column options |
|
add_index ( string $table_name, string $column_name, array $options = [] ) : boolean |
Add an index |
|
add_timestamps ( string $table_name, string $created_column_name, string $updated_column_name ) : boolean |
Add timestamps |
|
change_column ( string $table_name, string $column_name, string $type, array $options = [] ) : boolean |
Change a column |
|
column_definition ( string $column_name, string $type, array $options = null ) : string |
Column definition |
|
column_info ( string $table, string $column ) : array |
Get a column info |
|
commit_transaction ( ) |
Commit Transaction |
|
create_database ( string $db, array $options = [] ) : boolean |
Create database cannot run in a transaction block so if we're in a transaction
than commit it, do our thing and then re-invoke the transaction |
|
create_schema_version_table ( ) |
Create the schema table, if necessary |
|
create_table ( string $table_name, array $options = [] ) : boolean | Ruckusing_Adapter_PgSQL_TableDefinition |
Create table |
|
database_exists ( string $db ) : boolean |
Check if a db exists |
|
drop_database ( string $db ) : boolean |
Drop a database |
|
drop_table ( string $tbl ) : boolean |
Drop table |
|
execute ( $query ) |
|
|
execute_ddl ( string $ddl ) : boolean |
Use this method for non-SELECT queries
Or anything where you dont necessarily expect a result string, e.g. DROPs, CREATEs, etc. |
|
get_database_name ( ) : string |
Get the current db name |
|
has_index ( string $table_name, string $column_name, array $options = [] ) : boolean |
Check an index |
|
identifier ( string $string ) : string |
Quote a string |
|
indexes ( string $table_name ) : array |
Return all indexes of a table |
|
multi_query ( string $queries ) : boolean |
Execute several queries |
|
native_database_types ( ) : array |
Get the column native types |
|
pk_and_sequence_for ( string $table ) : array |
Returns a table's primary key and belonging sequence. |
|
primary_keys ( string $table_name ) : array |
get primary keys |
|
query ( string $query ) : boolean |
Wrapper to execute a query |
|
quote ( string $value, string $column = null ) : string |
Quote a string |
|
quote_column_name ( string $string ) : string |
Quote column name |
|
quote_string ( string $string ) : string |
Escape a string for mysql |
|
quote_table_name ( string $string ) : string |
Quote table name |
|
remove_column ( string $table_name, string $column_name ) : boolean |
Drop a column |
|
remove_index ( string $table_name, string $column_name, array $options = [] ) : boolean |
Drop an index |
|
remove_timestamps ( string $table_name, string $created_column_name, string $updated_column_name ) : boolean |
Remove timestamps |
|
remove_version ( string $version ) : boolean |
remove a version |
|
rename_column ( string $table_name, string $column_name, string $new_column_name ) : boolean |
Rename a column |
|
rename_table ( string $name, string $new_name ) : boolean |
Renames a table. |
|
rollback_transaction ( ) |
Rollback Transaction |
|
schema ( string $output_file ) : integer | FALSE |
Dump the complete schema of the DB. This is really just all of the
CREATE TABLE statements for all of the tables in the DB. |
|
select_all ( string $query ) : array |
Select all |
|
select_one ( string $query ) : array |
Select one |
|
set_current_version ( string $version ) : boolean |
Set current version |
|
start_transaction ( ) |
Start Transaction |
|
supports_migrations ( ) : boolean |
Check support for migrations |
|
table_exists ( string $tbl, boolean $reload_tables = false ) : boolean |
Check if a table exists |
|
type_to_sql ( string $type, array $options = [] ) : string |
Convert type to sql |
|