Index

SqliteHandler

MMO\pdo · 1 symbol · generated 5 Oct 2026

class

SqliteHandler

SqliteHandler.php:11
class MMO\pdo\SqliteHandler extends MMO\pdo\classes\aHandler
Namespace
MMO\pdo
Extends
aHandler

Constants1

MEMORY

SQLite's in-memory database: a fresh, empty database per connection, discarded when it closes.

const MEMORY = ':memory:'

Properties3

filename

protected string $filename
Type
string

password

protected string $password = ''
Type
string

user

protected string $user = ''
Type
string

Methods10

getFilename($resolve)

SqliteHandler.php:103
function getFilename(bool $resolve = true): stringNOTE: `:memory:` and a `file:` URI are DSNs, not paths. Resolving them produced `/path/to/project/:memory:`, and SQLite answered `unable to open database file` -- so an in-memory database, the obvious choice for a test or a demo, could not be opened at all.
$resolve = trueboolif true, resolve a relative path against the project root (filename)
returnsstring

__construct($filename, $user, $password)

SqliteHandler.php:19
function __construct(string $filename, string $user = '', string $password = '')
$filenamestring
$user = ''string
$password = ''string
Inherited members (62)
ConstantsDeclared byDescription
ALERTiLogLevelAlert: Action must be taken immediately.
ALLiLogLevelMask for all
ALL_PLUSiLogLeveldebug everything
BACKTRACEiLogLevel
CRITICALiLogLevelCritical: Critical conditions.
DEBUGiLogLevelDebug: Detailed debug information.
DEEPiLogLeveldebug everything with arguments
EMERGENCYiLogLevelEmergency: System is unusable.
ERRORiLogLevelError: Runtime errors that do not require immediate action but should typically be logged and monitored.
ERROR_PLUSiLogLevelMask for all error
FATALiLogLevelMask for all fatal error
INFOiLogLevelInfo: Interesting events.
INFO_PLUSiLogLevelMask for all errors/warning/notices/info
NOTICEiLogLevelNotice: Normal but significant events.
NOTICE_PLUSiLogLevelMask for all errors/warning/notices/info
TRACEiLogLevelinclude backtrace as origins
WARNINGiLogLevelWarning: Exceptional occurrences that are not errors.
WARNING_PLUSiLogLevelMask for all errors and warnings
PropertiesDeclared byDescription
handleaHandlerHandle to sql object
tablePrefixaHandler
tablesaHandler
transCountaHandler
verbosityaHandler
MethodsDeclared byDescription
addTable($table, $name)aHandler
addTableClass($class, $name)aHandler
alert($message, $context)aHandlerAction must be taken immediately.
backtraces($message, $context)aHandlerForce-log a message at INFO level together with a full stack trace/memory snapshot (iLogLevel::BACKTRACE), bypassing the verbosity mask entirely (any non-zero verbosity is enough to trigger it).
commit()aHandlerAlias to \PDO::commit().
createStatement($table, $fields, $primary, $index)aHandler
critical($message, $context)aHandlerCritical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask.
debug($message, $context)aHandlerDetailed debug information.
debugName()aHandlerHuman-readable identifier used as the default {origin} in this instance's log messages.
deleteStatement($table, $filter)aHandler
disconnect()aHandler
do($fn)aHandlerdo a safe transaction on the database if an exception is thrown, it rollbacks the database
dropStatement($table, $ifExists)aHandler
emergency($message, $context)aHandlerSystem is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask.
endTransaction()aHandlerUnwind one level of startTransaction, without committing or rolling anything back.
error($message, $context)aHandlerRuntime errors that do not require immediate action but should typically be logged and monitored.
getHandle()aHandler
getTables()aHandler
getVerbosity()aHandler
hasTable($table)aHandler
info($message, $context)aHandlerInteresting events. No-op if INFO is currently filtered out by the verbosity mask.
insertStatement($table, $values)aHandler
inTransaction()aHandler
isConnected()aHandler
lastId()aHandlerReturn last id in insert.
log($level, $message, $context)aHandlerLogs with an arbitrary level.
notice($message, $context)aHandlerNormal but significant events.
prepare($query)aHandlerPrepare a pdo statement
removeTable($table)aHandler
rollBack()aHandlerAbort the whole transaction, whatever the nesting depth: SQL has no partial rollback without savepoints, so one rollback discards every level at once and resets $transCount to zero.
selectStatement($table, $fields, $filter)aHandler
setVerbosity($verb)aHandlerSet the current verbosity mask, replacing whatever it was before.
startTransaction()aHandlerSafe Alias to \PDO::beginTranscation() if inside another transaction, doesn't throw an exception and ignore call.
statement($template, $content, $opts)aHandler
testVerbosity($level)aHandlerTest whether a given level (or set of levels) is currently enabled by this instance's verbosity mask.
updateStatement($table, $values, $filter)aHandler
warning($message, $context)aHandlerExceptional occurrences that are not errors.
__destruct()aHandler
__wakeup()aHandler