class Doctrine_Import_Sqlite extends Doctrine_Import (View source)

Properties

protected Doctrine_Connection $conn from Doctrine_Connection_Module
protected string $moduleName from Doctrine_Connection_Module
protected $sql from Doctrine_Import

Methods

__construct(Doctrine_Connection $conn = null)

No description

getConnection()

getConnection returns the connection object this module uses

string
getModuleName()

getModuleName returns the name of this module

array
listDatabases()

lists all databases

array
listFunctions()

lists all availible database functions

array
listTriggers(string|null $database = null)

lists all database triggers

array
listSequences(string|null $database = null)

lists all database sequences

array
listTableConstraints(string $table)

lists table constraints

array
listTableRelations(string $table)

lists table relations

array
listTableColumns(string $table)

lists table constraints

array
listTableIndexes(string $table)

lists table constraints

array
listTables(string|null $database = null)

lists tables

array
listTableTriggers(string $table)

lists table triggers

array
listTableViews(string $table)

lists table views

array
listUsers()

lists database users

array
listViews(string|null $database = null)

lists database views

boolean
databaseExists(string $database)

checks if a database exists

boolean
functionExists(string $function)

checks if a function exists

boolean
triggerExists(string $trigger, string|null $database = null)

checks if a trigger exists

boolean
sequenceExists(string $sequence, string|null $database = null)

checks if a sequence exists

boolean
tableConstraintExists(string $constraint, string $table)

checks if a table constraint exists

boolean
tableColumnExists(string $column, string $table)

checks if a table column exists

boolean
tableIndexExists(string $index, string $table)

checks if a table index exists

boolean
tableExists(string $table, string|null $database = null)

checks if a table exists

boolean
tableTriggerExists(string $trigger, string $table)

checks if a table trigger exists

boolean
tableViewExists(string $view, string $table)

checks if a table view exists

boolean
userExists(string $user)

checks if a user exists

boolean
viewExists(string $view, string|null $database = null)

checks if a view exists

array
importSchema($directory, array $connections = array(), array $options = array())

importSchema

Details

__construct(Doctrine_Connection $conn = null)

Parameters

Doctrine_Connection $conn Doctrine_Connection object, every connection module holds an instance of Doctrine_Connection

Doctrine_Connection getConnection()

getConnection returns the connection object this module uses

Return Value

Doctrine_Connection

string getModuleName()

getModuleName returns the name of this module

Return Value

string the name of this module

array listDatabases()

lists all databases

Return Value

array

array listFunctions()

lists all availible database functions

Return Value

array

array listTriggers(string|null $database = null)

lists all database triggers

Parameters

string|null $database

Return Value

array

array listSequences(string|null $database = null)

lists all database sequences

Parameters

string|null $database

Return Value

array

array listTableConstraints(string $table)

lists table constraints

Parameters

string $table database table name

Return Value

array

array listTableRelations(string $table)

lists table relations

Expects an array of this format to be returned with all the relationships in it where the key is the name of the foreign table, and the value is an array containing the local and foreign column name

Array ( [groups] => Array ( [local] => group_id [foreign] => id ) )

Parameters

string $table database table name

Return Value

array

array listTableColumns(string $table)

lists table constraints

Parameters

string $table database table name

Return Value

array

array listTableIndexes(string $table)

lists table constraints

Parameters

string $table database table name

Return Value

array

array listTables(string|null $database = null)

lists tables

Parameters

string|null $database

Return Value

array

array listTableTriggers(string $table)

lists table triggers

Parameters

string $table database table name

Return Value

array

array listTableViews(string $table)

lists table views

Parameters

string $table database table name

Return Value

array

array listUsers()

lists database users

Return Value

array

array listViews(string|null $database = null)

lists database views

Parameters

string|null $database

Return Value

array

boolean databaseExists(string $database)

checks if a database exists

Parameters

string $database

Return Value

boolean

boolean functionExists(string $function)

checks if a function exists

Parameters

string $function

Return Value

boolean

boolean triggerExists(string $trigger, string|null $database = null)

checks if a trigger exists

Parameters

string $trigger
string|null $database

Return Value

boolean

boolean sequenceExists(string $sequence, string|null $database = null)

checks if a sequence exists

Parameters

string $sequence
string|null $database

Return Value

boolean

boolean tableConstraintExists(string $constraint, string $table)

checks if a table constraint exists

Parameters

string $constraint
string $table database table name

Return Value

boolean

boolean tableColumnExists(string $column, string $table)

checks if a table column exists

Parameters

string $column
string $table database table name

Return Value

boolean

boolean tableIndexExists(string $index, string $table)

checks if a table index exists

Parameters

string $index
string $table database table name

Return Value

boolean

boolean tableExists(string $table, string|null $database = null)

checks if a table exists

Parameters

string $table
string|null $database

Return Value

boolean

boolean tableTriggerExists(string $trigger, string $table)

checks if a table trigger exists

Parameters

string $trigger
string $table database table name

Return Value

boolean

boolean tableViewExists(string $view, string $table)

checks if a table view exists

Parameters

string $view
string $table database table name

Return Value

boolean

boolean userExists(string $user)

checks if a user exists

Parameters

string $user

Return Value

boolean

boolean viewExists(string $view, string|null $database = null)

checks if a view exists

Parameters

string $view
string|null $database

Return Value

boolean

array importSchema($directory, array $connections = array(), array $options = array())

importSchema

method for importing existing schema to Doctrine_Record classes

Parameters

$directory
array $connections
array $options

Return Value

array the names of the imported classes