autoid |
[W] |
Set the autogenerated primary key integer to be returned when running an
insert query. Argument types supported:
nil : | Return nil for all inserts
|
Integer : | Starting integer for next insert, with futher inserts getting an
incremented value
|
Array : | First insert gets the first value in the array, second gets the second
value, etc.
|
Proc : | Called with the insert SQL query, uses the value
returned
|
Class : | Should be an Exception subclass, will create a new instance an raise it
wrapped in a DatabaseError.
|
|
columns |
[W] |
Set the columns to set in the dataset when the dataset fetches rows.
Argument types supported:
Array of Symbols: Used for all datasets Array (otherwise): First retrieval gets the
first value in the
array, second gets the second value, etc.
Proc : | Called with the select SQL query, uses the value
returned, which should be an array of symbols
|
|
fetch |
[W] |
Set the hashes to yield by execute when
retrieving rows. Argument types supported:
nil : | Yield no rows
|
Hash : | Always yield a single row with this hash
|
Array of Hashes : | Yield separately for each hash in this array
|
Array (otherwise) : | First retrieval gets the first value in the array, second gets the second
value, etc.
|
Proc : | Called with the select SQL query, uses the value
returned, which should be a hash or array of hashes.
|
Class : | Should be an Exception subclass, will create a new instance an raise it
wrapped in a DatabaseError.
|
|
numrows |
[W] |
Set the number of rows to return from update or delete. Argument types
supported:
nil : | Return 0 for all updates and deletes
|
Integer : | Used for all updates and deletes
|
Array : | First update/delete gets the first value in the array, second gets the
second value, etc.
|
Proc : | Called with the update/delete SQL query, uses the
value returned.
|
Class : | Should be an Exception subclass, will create a new instance an raise it
wrapped in a DatabaseError.
|
|
server_version |
[RW] |
Mock the server version, useful when using the
shared adapters
|