Propel API
Class

PropelSQLExec

class PropelSQLExec extends Task

Executes all SQL files referenced in the sqldbmap file against their mapped databases.

This task uses an SQL -> Database map in the form of a properties
file to insert each SQL file listed into its designated database.

Methods

setSqlDbMap(sqldbmap $sqldbmap)

Set the sqldbmap properties file.

filename getSqlDbMap()

Get the sqldbmap properties file.

setBuildConnections(array $buildConnections)

Set the buildtime connection settings.

array getBuildConnections()

Get the buildtime connection settings.

array getBuildConnection(string $database)

Get the buildtime connection settings for a given database name.

setSrcDir(PhingFile $srcDir)

Set the src directory for the sql files listed in the sqldbmap file.

PhingFile getSrcDir()

Get the src directory for the sql files listed in the sqldbmap file.

setUrl(string $url)

Set the DB connection url.

setUserid(string $userId)

Set the user name for the DB connection.

setPassword(string $password)

Set the password for the DB connection.

setAutoCommit(boolean $autocommit)

Set the autocommit flag for the DB connection.

setOnerror(string $action)

Set the action to perform onerror

main()

Load the sql file and then execute it

Details

at line 74
public setSqlDbMap(sqldbmap $sqldbmap)

Set the sqldbmap properties file.

Parameters

sqldbmap $sqldbmap filename for the sqldbmap

at line 84
public filename getSqlDbMap()

Get the sqldbmap properties file.

Return Value

filename for the sqldbmap

at line 94
public setBuildConnections(array $buildConnections)

Set the buildtime connection settings.

Parameters

array $buildConnections

at line 104
public array getBuildConnections()

Get the buildtime connection settings.

Return Value

array $buildConnections

at line 115
public array getBuildConnection(string $database)

Get the buildtime connection settings for a given database name.

Parameters

string $database

Return Value

array $buildConnections

at line 133
public setSrcDir(PhingFile $srcDir)

Set the src directory for the sql files listed in the sqldbmap file.

Parameters

PhingFile $srcDir sql source directory

at line 143
public PhingFile getSrcDir()

Get the src directory for the sql files listed in the sqldbmap file.

Return Value

PhingFile SQL Source directory

at line 153
public setUrl(string $url)

Set the DB connection url.

Parameters

string $url connection url

at line 164
public setUserid(string $userId)

Set the user name for the DB connection.

Parameters

string $userId database user

at line 175
public setPassword(string $password)

Set the password for the DB connection.

Parameters

string $password database password

at line 185
public setAutoCommit(boolean $autocommit)

Set the autocommit flag for the DB connection.

Parameters

boolean $autocommit the autocommit flag

at line 195
public setOnerror(string $action)

Set the action to perform onerror

Parameters

string $action

at line 205
public main()

Load the sql file and then execute it

Exceptions

BuildException