* @copyright 2012 - 2018 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link https://git.timshomepage.net/aviat4ion/Query */ namespace Query\Drivers\Sqlite; use Query\Drivers\AbstractSQL; use Query\Exception\NotImplementedException; /** * SQLite Specific SQL */ class SQL extends AbstractSQL { /** * Get the query plan for the sql query * * @param string $sql * @return string */ public function explain(string $sql): string { return "EXPLAIN QUERY PLAN {$sql}"; } /** * Random ordering keyword * * @return string */ public function random(): string { return ' RANDOM()'; } /** * Returns sql to list other databases * * @return string */ public function dbList(): string { return 'PRAGMA database_list'; } /** * Returns sql to list tables * * @return string */ public function tableList(): string { return <<