> */ public function rows( string $sql ): array; /** * Fetch a single row. * * @param string $sql SQL statement. * @return array|null */ public function row( string $sql ): ?array; /** * Fetch a single scalar value. * * @param string $sql SQL statement. * @param mixed $fallback Value returned when the query yields nothing. * @return mixed */ public function var( string $sql, $fallback = null ); /** * Fetch the first column of every row. * * @param string $sql SQL statement. * @return array */ public function column( string $sql ): array; /** * Escape a value for inline use in an SQL statement. * * @param string $value Raw value. * @return string */ public function escape( string $value ): string; /** * Table prefix of the current site. * * @return string */ public function prefix(): string; /** * Insert a row and return the insert id. * * @param string $table Table name (unprefixed). * @param array $data Column values. * @return int */ public function insert( string $table, array $data ): int; /** * Update rows. * * @param string $table Table name (unprefixed). * @param array $data Column values. * @param array $where Equality conditions. * @return int Affected rows. */ public function update( string $table, array $data, array $where ): int; /** * Prepare an SQL query for safe execution. * * @param string $query Query statement with %d, %s, %f placeholders. * @param mixed ...$args Values to bind. * @return string Prepared SQL statement. */ public function prepare( string $query, ...$args ): string; /** * Last error reported by the driver. * * @return string */ public function error(): string; }