Propel 2 API
Class

Propel\Generator\Builder\Sql\DataSQLBuilder

abstract class DataSQLBuilder extends DataModelBuilder

Baseclass for SQL data dump SQL building classes.

Methods

__construct(Table $table)

Creates new instance of DataModelBuilder subclass.

from DataModelBuilder
PluralizerInterface getPluralizer()

Returns new or existing Pluralizer class.

from DataModelBuilder
ObjectBuilder getObjectBuilder()

Returns new or existing Object builder class for this table.

from DataModelBuilder
ObjectBuilder getStubObjectBuilder()

Returns new or existing stub Object builder class for this table.

from DataModelBuilder
ObjectBuilder getQueryBuilder()

Returns new or existing Query builder class for this table.

from DataModelBuilder
ObjectBuilder getStubQueryBuilder()

Returns new or existing stub Query builder class for this table.

from DataModelBuilder
ObjectBuilder getTableMapBuilder()

Returns new or existing Object builder class for this table.

from DataModelBuilder
ObjectBuilder getInterfaceBuilder()

Returns new or existing stub Interface builder class for this table.

from DataModelBuilder
ObjectBuilder getMultiExtendObjectBuilder()

Returns new or existing stub child object builder class for this table.

from DataModelBuilder
DataSQLBuilder getDataSQLBuilder()

Returns new or existing data sql builder class for this table.

from DataModelBuilder
DataModelBuilder getNewBuilder(Table $table, string $classname)

Gets a new data model builder class for specified table and classname.

from DataModelBuilder
ObjectBuilder getNewObjectBuilder(Table $table)

Convenience method to return a NEW Object class builder instance.

from DataModelBuilder
ObjectBuilder getNewStubObjectBuilder(Table $table)

Convenience method to return a NEW Object stub class builder instance.

from DataModelBuilder
QueryBuilder getNewQueryBuilder(Table $table)

Convenience method to return a NEW query class builder instance.

from DataModelBuilder
QueryBuilder getNewStubQueryBuilder(Table $table)

Convenience method to return a NEW query stub class builder instance.

from DataModelBuilder
ObjectBuilder getNewQueryInheritanceBuilder($child)

Returns new Query Inheritance builder class for this table.

from DataModelBuilder
ObjectBuilder getNewStubQueryInheritanceBuilder($child)

Returns new stub Query Inheritance builder class for this table.

from DataModelBuilder
TableMapBuilder getNewTableMapBuilder(Table $table)

Returns new stub Query Inheritance builder class for this table.

from DataModelBuilder
GeneratorConfigInterface getGeneratorConfig()

Gets the GeneratorConfig object.

from DataModelBuilder
string getBuildProperty(string $name)

Get a specific [name transformed] build property.

from DataModelBuilder
setGeneratorConfig(GeneratorConfigInterface $v)

Sets the GeneratorConfig object.

from DataModelBuilder
setTable(Table $table)

Sets the table for this builder.

from DataModelBuilder
Table getTable()

Returns the current Table object.

from DataModelBuilder
PlatformInterface getPlatform()

Convenience method to returns the Platform class for this table (database).

from DataModelBuilder
setPlatform(PlatformInterface $platform)

Platform setter

from DataModelBuilder
Database getDatabase()

Convenience method to returns the database for current table.

from DataModelBuilder
string[] getWarnings()

Gets array of warning messages.

from DataModelBuilder
string quoteIdentifier(string $text)

Wraps call to Platform->quoteIdentifier() with a check to see whether quoting is enabled.

from DataModelBuilder
string prefixClassName($identifier)

Returns the name of the current class being built, with a possible prefix.

from DataModelBuilder
static  reset()

Performs any reset between runs of this builder.

static string getDatabaseStartSql()

Returns any SQL to place at the start of all the row inserts.

static string getDatabaseEndSql()

Returns any SQL to place at the end of all the row inserts.

string getTableStartSql()

Returns any SQL to place before row inserts for a new table.

string getTableEndSql()

Returns any SQL to place at the end of row inserts for a table.

string buildRowSql(DataRow $row)

The main method in this class, returns the SQL for INSERTing data into a row.

string getTimestampSql(string $value)

Returns a representation of a timestamp value suitable for use in a SQL statement.

Details

in DataModelBuilder at line 122
public __construct(Table $table)

Creates new instance of DataModelBuilder subclass.

Parameters

Table $table The Table which we are using to build [OM, DDL, etc.].

in DataModelBuilder at line 131
public PluralizerInterface getPluralizer()

Returns new or existing Pluralizer class.

Return Value

PluralizerInterface

in DataModelBuilder at line 144
public ObjectBuilder getObjectBuilder()

Returns new or existing Object builder class for this table.

Return Value

ObjectBuilder

in DataModelBuilder at line 157
public ObjectBuilder getStubObjectBuilder()

Returns new or existing stub Object builder class for this table.

Return Value

ObjectBuilder

in DataModelBuilder at line 170
public ObjectBuilder getQueryBuilder()

Returns new or existing Query builder class for this table.

Return Value

ObjectBuilder

in DataModelBuilder at line 183
public ObjectBuilder getStubQueryBuilder()

Returns new or existing stub Query builder class for this table.

Return Value

ObjectBuilder

in DataModelBuilder at line 196
public ObjectBuilder getTableMapBuilder()

Returns new or existing Object builder class for this table.

Return Value

ObjectBuilder

in DataModelBuilder at line 209
public ObjectBuilder getInterfaceBuilder()

Returns new or existing stub Interface builder class for this table.

Return Value

ObjectBuilder

in DataModelBuilder at line 222
public ObjectBuilder getMultiExtendObjectBuilder()

Returns new or existing stub child object builder class for this table.

Return Value

ObjectBuilder

in DataModelBuilder at line 235
public DataSQLBuilder getDataSQLBuilder()

Returns new or existing data sql builder class for this table.

Return Value

DataSQLBuilder

in DataModelBuilder at line 251
public DataModelBuilder getNewBuilder(Table $table, string $classname)

Gets a new data model builder class for specified table and classname.

Parameters

Table $table
string $classname The class of builder

Return Value

DataModelBuilder

in DataModelBuilder at line 268
public ObjectBuilder getNewObjectBuilder(Table $table)

Convenience method to return a NEW Object class builder instance.

This is used very frequently from the tableMap and object builders to get
an object builder for a RELATED table.

Parameters

Table $table

Return Value

ObjectBuilder

in DataModelBuilder at line 282
public ObjectBuilder getNewStubObjectBuilder(Table $table)

Convenience method to return a NEW Object stub class builder instance.

This is used from the query builders to get
an object builder for a RELATED table.

Parameters

Table $table

Return Value

ObjectBuilder

in DataModelBuilder at line 296
public QueryBuilder getNewQueryBuilder(Table $table)

Convenience method to return a NEW query class builder instance.

This is used from the query builders to get
a query builder for a RELATED table.

Parameters

Table $table

Return Value

QueryBuilder

in DataModelBuilder at line 310
public QueryBuilder getNewStubQueryBuilder(Table $table)

Convenience method to return a NEW query stub class builder instance.

This is used from the query builders to get
a query builder for a RELATED table.

Parameters

Table $table

Return Value

QueryBuilder

in DataModelBuilder at line 319
public ObjectBuilder getNewQueryInheritanceBuilder($child)

Returns new Query Inheritance builder class for this table.

Parameters

$child

Return Value

ObjectBuilder

in DataModelBuilder at line 331
public ObjectBuilder getNewStubQueryInheritanceBuilder($child)

Returns new stub Query Inheritance builder class for this table.

Parameters

$child

Return Value

ObjectBuilder

in DataModelBuilder at line 343
public TableMapBuilder getNewTableMapBuilder(Table $table)

Returns new stub Query Inheritance builder class for this table.

Parameters

Table $table

Return Value

TableMapBuilder

in DataModelBuilder at line 353
public GeneratorConfigInterface getGeneratorConfig()

Gets the GeneratorConfig object.

in DataModelBuilder at line 364
public string getBuildProperty(string $name)

Get a specific [name transformed] build property.

Parameters

string $name

Return Value

string

in DataModelBuilder at line 378
public setGeneratorConfig(GeneratorConfigInterface $v)

Sets the GeneratorConfig object.

Parameters

GeneratorConfigInterface $v

in DataModelBuilder at line 387
public setTable(Table $table)

Sets the table for this builder.

Parameters

Table $table

in DataModelBuilder at line 396
public Table getTable()

Returns the current Table object.

Return Value

Table

in DataModelBuilder at line 405
public PlatformInterface getPlatform()

Convenience method to returns the Platform class for this table (database).

Return Value

PlatformInterface

in DataModelBuilder at line 423
public setPlatform(PlatformInterface $platform)

Platform setter

Parameters

PlatformInterface $platform

in DataModelBuilder at line 432
public Database getDatabase()

Convenience method to returns the database for current table.

Return Value

Database

in DataModelBuilder at line 452
public string[] getWarnings()

Gets array of warning messages.

Return Value

string[]

in DataModelBuilder at line 467
public string quoteIdentifier(string $text)

Wraps call to Platform->quoteIdentifier() with a check to see whether quoting is enabled.

All subclasses should call this quoteIdentifier() method rather than calling the Platform
method directly. This method is used by both DataSQLBuilder and DDLBuilder, and potentially
in the OM builders also, which is why it is defined in this class.

Parameters

string $text The text to quote.

Return Value

string Quoted text.

in DataModelBuilder at line 481
public string prefixClassName($identifier)

Returns the name of the current class being built, with a possible prefix.

Parameters

$identifier

Return Value

string

See also

OMBuilder#getClassName()

at line 29
static public reset()

Performs any reset between runs of this builder.

This can be used, for example, to clear any stored start/end SQL.

at line 39
static public string getDatabaseStartSql()

Returns any SQL to place at the start of all the row inserts.

Return Value

string

at line 49
static public string getDatabaseEndSql()

Returns any SQL to place at the end of all the row inserts.

Return Value

string

at line 59
public string getTableStartSql()

Returns any SQL to place before row inserts for a new table.

Return Value

string

at line 69
public string getTableEndSql()

Returns any SQL to place at the end of row inserts for a table.

Return Value

string

at line 81
public string buildRowSql(DataRow $row)

The main method in this class, returns the SQL for INSERTing data into a row.

Parameters

DataRow $row

Return Value

string

at line 266
public string getTimestampSql(string $value)

Returns a representation of a timestamp value suitable for use in a SQL statement.

Parameters

string $value

Return Value

string