add sqlite query driver.

This commit is contained in:
Taylor Otwell
2012-05-03 08:28:40 -05:00
parent 4822f847c2
commit 295c3b80c2
3 changed files with 28 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
<?php namespace Laravel\Database\Query\Grammars;
use Laravel\Database\Query;
class SQLite extends Grammar
{
/**
* Compile the ORDER BY clause for a query.
*
* @param Query $query
* @return string
*/
protected function orderings(Query $query)
{
foreach ($query->orderings as $ordering)
{
$sql[] = $this->wrap($ordering['column']).' COLLATE NOCASE '.strtoupper($ordering['direction']);
}
return 'ORDER BY '.implode(', ', $sql);
}
}