Use PicoDb operator ilike() instead of like()

This commit is contained in:
Frédéric Guillot
2014-12-26 12:20:17 -05:00
parent fbfaaa69b1
commit 2b27d986b3
2 changed files with 20 additions and 20 deletions

View File

@@ -26,7 +26,7 @@ class TaskPaginator extends Base
{ {
return $this->taskFinder->getQuery() return $this->taskFinder->getQuery()
->eq('project_id', $project_id) ->eq('project_id', $project_id)
->like('title', '%'.$search.'%') ->ilike('title', '%'.$search.'%')
->offset($offset) ->offset($offset)
->limit($limit) ->limit($limit)
->orderBy($column, $direction) ->orderBy($column, $direction)
@@ -45,7 +45,7 @@ class TaskPaginator extends Base
{ {
return $this->db->table(Task::TABLE) return $this->db->table(Task::TABLE)
->eq('project_id', $project_id) ->eq('project_id', $project_id)
->like('title', '%'.$search.'%') ->ilike('title', '%'.$search.'%')
->count(); ->count();
} }

36
composer.lock generated
View File

@@ -88,12 +88,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fguillot/picoDb.git", "url": "https://github.com/fguillot/picoDb.git",
"reference": "ebe721de0002b7ff86b7f66df0065224bf896eb2" "reference": "5d1d8d6e898975fc30a241614d9bf06d5728db7d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fguillot/picoDb/zipball/ebe721de0002b7ff86b7f66df0065224bf896eb2", "url": "https://api.github.com/repos/fguillot/picoDb/zipball/5d1d8d6e898975fc30a241614d9bf06d5728db7d",
"reference": "ebe721de0002b7ff86b7f66df0065224bf896eb2", "reference": "5d1d8d6e898975fc30a241614d9bf06d5728db7d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -117,7 +117,7 @@
], ],
"description": "Minimalist database query builder", "description": "Minimalist database query builder",
"homepage": "https://github.com/fguillot/picoDb", "homepage": "https://github.com/fguillot/picoDb",
"time": "2014-11-22 04:15:43" "time": "2014-12-26 17:10:34"
}, },
{ {
"name": "fguillot/simple-validator", "name": "fguillot/simple-validator",
@@ -125,12 +125,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fguillot/simpleValidator.git", "url": "https://github.com/fguillot/simpleValidator.git",
"reference": "14f7c0b111444a5b26ce447ef5f0de655279b5f1" "reference": "3bfa1ef0062906c83824ce8db1219914996d9bd4"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fguillot/simpleValidator/zipball/14f7c0b111444a5b26ce447ef5f0de655279b5f1", "url": "https://api.github.com/repos/fguillot/simpleValidator/zipball/3bfa1ef0062906c83824ce8db1219914996d9bd4",
"reference": "14f7c0b111444a5b26ce447ef5f0de655279b5f1", "reference": "3bfa1ef0062906c83824ce8db1219914996d9bd4",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -154,7 +154,7 @@
], ],
"description": "The most easy to use validator library for PHP :)", "description": "The most easy to use validator library for PHP :)",
"homepage": "https://github.com/fguillot/simpleValidator", "homepage": "https://github.com/fguillot/simpleValidator",
"time": "2014-09-09 05:31:14" "time": "2014-11-25 22:58:14"
}, },
{ {
"name": "ircmaxell/password-compat", "name": "ircmaxell/password-compat",
@@ -415,16 +415,16 @@
}, },
{ {
"name": "swiftmailer/swiftmailer", "name": "swiftmailer/swiftmailer",
"version": "v5.3.0", "version": "v5.3.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git", "url": "https://github.com/swiftmailer/swiftmailer.git",
"reference": "b86b927dfefdb56ab0b22d1350033d9a38e9f205" "reference": "c5f963e7f9d6f6438fda4f22d5cc2db296ec621a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/b86b927dfefdb56ab0b22d1350033d9a38e9f205", "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/c5f963e7f9d6f6438fda4f22d5cc2db296ec621a",
"reference": "b86b927dfefdb56ab0b22d1350033d9a38e9f205", "reference": "c5f963e7f9d6f6438fda4f22d5cc2db296ec621a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -463,21 +463,21 @@
"mail", "mail",
"mailer" "mailer"
], ],
"time": "2014-10-04 05:53:18" "time": "2014-12-05 14:17:14"
}, },
{ {
"name": "symfony/console", "name": "symfony/console",
"version": "v2.6.0", "version": "v2.6.1",
"target-dir": "Symfony/Component/Console", "target-dir": "Symfony/Component/Console",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/Console.git", "url": "https://github.com/symfony/Console.git",
"reference": "d3bac228fd7a2aac9193e241b239880b3ba39a10" "reference": "ef825fd9f809d275926547c9e57cbf14968793e8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/d3bac228fd7a2aac9193e241b239880b3ba39a10", "url": "https://api.github.com/repos/symfony/Console/zipball/ef825fd9f809d275926547c9e57cbf14968793e8",
"reference": "d3bac228fd7a2aac9193e241b239880b3ba39a10", "reference": "ef825fd9f809d275926547c9e57cbf14968793e8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -520,7 +520,7 @@
], ],
"description": "Symfony Console Component", "description": "Symfony Console Component",
"homepage": "http://symfony.com", "homepage": "http://symfony.com",
"time": "2014-11-20 13:24:23" "time": "2014-12-02 20:19:20"
} }
], ],
"packages-dev": [], "packages-dev": [],