AbstractWriter
class AbstractWriter (View source)
Class DatabaseWriter
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.
delete
Get the number of affected rows for the previous executed SQL statement.
Method to get the auto-incremented value from the last INSERT statement.
Method to get property Db
Method to get property Cursor
Method to set property cursor
Details
at line line 41
__construct(AbstractDatabaseDriver $db)
Constructor.
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.
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.
at line line 242
bool|AbstractWriter
saveOne(string $table, array $data, string $key, boolean $updateNulls = false)
save
at line line 276
mixed
insertMultiple(string $table, array $dataSet, array $key = null)
insertMultiple
at line line 302
mixed
updateMultiple(string $table, array $dataSet, array $key, boolean $updateNulls = false)
updateMultiple
at line line 328
mixed
saveMultiple(string $table, array $dataSet, array $key, boolean $updateNulls = false)
saveMultiple
at line line 356
boolean
updateBatch(string $table, array $data, mixed $conditions = array())
Batch update some data.
at line line 400
boolean
delete(string $table, array $conditions = array())
delete
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.
at line line 435
string
insertId()
Method to get the auto-incremented value from the last INSERT statement.
at line line 447
AbstractWriter
execute(string|Query $query)
execute
at line line 461
AbstractDatabaseDriver
getDriver()
Method to get property Db
at line line 473
AbstractWriter
setDriver(AbstractDatabaseDriver $db)
Method to set property db
at line line 485
resource
getCursor()
Method to get property Cursor
at line line 497
AbstractWriter
setCursor(resource $cursor)
Method to set property cursor