\Charcoal\SourceDatabaseSourceInterface

Summary

Methods
Constants
setTable()
table()
createTable()
alterTable()
tableExists()
tableStructure()
tableIsEmpty()
db()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

setTable()

setTable(string  $table) : \Charcoal\Source\DatabaseSource

Set the database's table to use.

Parameters

string $table

The database table.

Returns

\Charcoal\Source\DatabaseSource

Chainable

table()

table() : string

Get the database's current table.

Returns

string

createTable()

createTable() : boolean

Create a table from a model's metadata.

Returns

boolean —

Success / Failure

alterTable()

alterTable() : boolean

Alter an existing table to match the model's metadata.

Returns

boolean —

Success / Failure

tableExists()

tableExists() : boolean

Returns

boolean

tableStructure()

tableStructure() : array

Get the table columns information.

Returns

array

tableIsEmpty()

tableIsEmpty() : boolean

Check wether the source table is empty (`true`) or not (`false`)

Returns

boolean

db()

db() : \PDO

Returns

\PDO