* @copyright 2012 - 2023 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License * @link https://git.timshomepage.net/aviat/Query * @version 4.1.0 */ namespace Query\Drivers; /** * Parent for database-specific syntax subclasses */ abstract class AbstractSQL implements SQLInterface { /** * Limit clause */ public function limit(string $sql, int $limit, ?int $offset=NULL): string { $sql .= "\nLIMIT {$limit}"; if (is_numeric($offset)) { $sql .= " OFFSET {$offset}"; } return $sql; } }