45 return $this->db->getData($query, $callback,
$params);
52 return $this->db->getDataRow($query, $callback,
$params);
59 return $this->db->insertData($query,
$params);
66 return $this->db->updateData($query, $getNumRows,
$params);
73 return $this->db->deleteData($query,
$params);
81 if (function_exists(
'elgg_deprecated_notice')) {
84 return $this->db->prefix;
91 return $this->db->sanitizeInt(
$value, $signed);
98 return $this->db->sanitizeString(
$value);
108 if (
$name ===
'prefix') {
109 return $this->db->prefix;
112 throw new \RuntimeException(
"Cannot read property '$name'");
123 throw new \RuntimeException(
"Cannot write property '$name'");
133 return $this->db->fingerprintCallback($callback);
143 $this->db->setTimer($timer);
153 $this->db->setLogger($logger);
163 $this->db->setupConnections();
173 $this->db->connect(
$type);
183 $this->db->runSqlScript($scriptlocation);
203 $this->db->executeDelayedQueries();
213 $this->db->enableQueryCache();
223 $this->db->disableQueryCache();
233 $this->db->assertInstalled();
243 return $this->db->getQueryCount();
253 return $this->db->getServerVersion(
$type);
if($guid==elgg_get_logged_in_user_guid()) $name
setupConnections()
{Establish database connections.If the configuration has been set up for multiple read/write database...
getServerVersion($type)
{Get the server version number.Connection type (Config constants, e.g. Config::READ_WRITE)string Empt...
executeDelayedQueries()
{Trigger all queries that were registered as "delayed" queries.This is called by the system automatic...
fingerprintCallback($callback)
{Get a string that uniquely identifies a callback during the current request.This is used to cache qu...
connect($type="readwrite")
{Establish a connection to the database server.Connect to the database server and use the Elgg databa...
sanitizeString($value)
{Sanitizes a string for use in a query.Value to escape string }
runSqlScript($scriptlocation)
{Runs a full database script from disk.The file specified should be a standard SQL file as created by...
setLogger(Logger $logger)
{Set the logger object.The logger void @access private}
insertData($query, array $params=[])
{Insert a row into the database.Altering the DB invalidates all queries in the query cache....
disableQueryCache()
{Disable the query cache.This is useful for special scripts that pull large amounts of data back in s...
getDataRow($query, $callback='', array $params=[])
{Retrieve a single row from the database.Similar to () but returns only the first row matched....
deleteData($query, array $params=[])
{Delete data from the database.Altering the DB invalidates all queries in query cache....
__construct(ElggDb $db)
Constructor.
sanitizeInt($value, $signed=true)
{Sanitizes an integer value for use in a query.Value to sanitize Whether negative values are allowed ...
getQueryCount()
{Get the number of queries made to the database.int @access private}
updateData($query, $getNumRows=false, array $params=[])
{Update the database.Altering the DB invalidates all queries in the query cache.WARNING!...
__get($name)
Handle magic property reads.
getTablePrefix()
{Get the value of the "prefix" property.Database::$prefixstring }
getData($query, $callback='', array $params=[])
{Retrieve rows from the database.Queries are executed with () and results are retrieved with ()....
assertInstalled()
{Test that the Elgg database is installed.void }
__set($name, $value)
Handle magic property writes.
registerDelayedQuery($query, $type, $handler="", array $params=[])
{Queue a query for execution upon shutdown.You can specify a callback if you care about the result....
enableQueryCache()
{Enable the query cache.This does not take precedence over the \Elgg\Database\Config setting....
Capture timing info for profiling.
elgg_deprecated_notice($msg, $dep_version, $backtrace_level=1)
Log a notice about deprecated use of a function, view, etc.
if(! $display_name) $type