1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-29 13:41:28 +00:00

Merge pull request #1201 from kongjian/develop

support eq&ne for orm
This commit is contained in:
astaxie 2015-06-13 10:54:47 +08:00
commit cb89cd577d
4 changed files with 8 additions and 0 deletions

View File

@ -44,6 +44,8 @@ var (
"gte": true,
"lt": true,
"lte": true,
"eq": true,
"nq": true,
"startswith": true,
"endswith": true,
"istartswith": true,

View File

@ -30,6 +30,8 @@ var mysqlOperators = map[string]string{
"gte": ">= ?",
"lt": "< ?",
"lte": "<= ?",
"eq": "= ?",
"ne": "!= ?",
"startswith": "LIKE BINARY ?",
"endswith": "LIKE BINARY ?",
"istartswith": "LIKE ?",

View File

@ -29,6 +29,8 @@ var postgresOperators = map[string]string{
"gte": ">= ?",
"lt": "< ?",
"lte": "<= ?",
"eq": "= ?",
"ne": "!= ?",
"startswith": "LIKE ?",
"endswith": "LIKE ?",
"istartswith": "LIKE UPPER(?)",

View File

@ -29,6 +29,8 @@ var sqliteOperators = map[string]string{
"gte": ">= ?",
"lt": "< ?",
"lte": "<= ?",
"eq": "= ?",
"ne": "!= ?",
"startswith": "LIKE ? ESCAPE '\\'",
"endswith": "LIKE ? ESCAPE '\\'",
"istartswith": "LIKE ? ESCAPE '\\'",