MysqlWriter
class MysqlWriter extends PdoWriter (View source)
Class MysqlWriter
Methods
Inserts a row into a table based on an object's properties.
Updates a row in a table based on an object's properties.
save
insertMultiple
updateMultiple
saveMultiple
Batch update some data.
Get the number of affected rows for the previous executed SQL statement.
Method to get the auto-incremented value from the last INSERT statement.
Details
in AbstractWriter at line line 41
__construct(AbstractDatabaseDriver $db)
Constructor.
in AbstractWriter at line line 58
AbstractWriter
insertOne(string $table, array|object $data, string $key = null)
Inserts a row into a table based on an object's properties.
in AbstractWriter at line line 150
boolean
updateOne(string $table, array|object $data, array $key, boolean $updateNulls = false)
Updates a row in a table based on an object's properties.
in AbstractWriter at line line 242
bool|AbstractWriter
saveOne(string $table, array $data, string $key, boolean $updateNulls = false)
save
in AbstractWriter at line line 276
mixed
insertMultiple(string $table, array $dataSet, array $key = null)
insertMultiple
in AbstractWriter at line line 302
mixed
updateMultiple(string $table, array $dataSet, array $key, boolean $updateNulls = false)
updateMultiple
in AbstractWriter at line line 328
mixed
saveMultiple(string $table, array $dataSet, array $key, boolean $updateNulls = false)
saveMultiple
in AbstractWriter at line line 356
boolean
updateBatch(string $table, array $data, mixed $conditions = array())
Batch update some data.
in AbstractWriter at line line 400
boolean
delete(string $table, array $conditions = array())
delete
in AbstractWriter at line line 422
integer
countAffected()
Get the number of affected rows for the previous executed SQL statement.
Only applicable for DELETE, INSERT, or UPDATE statements.
in AbstractWriter at line line 435
string
insertId()
Method to get the auto-incremented value from the last INSERT statement.
in AbstractWriter at line line 447
AbstractWriter
execute(string|Query $query)
execute
in AbstractWriter at line line 461
AbstractDatabaseDriver
getDriver()
Method to get property Db
in AbstractWriter at line line 473
AbstractWriter
setDriver(AbstractDatabaseDriver $db)
Method to set property db
in AbstractWriter at line line 485
resource
getCursor()
Method to get property Cursor
in AbstractWriter at line line 497
AbstractWriter
setCursor(resource $cursor)
Method to set property cursor