1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 14:40:57 +00:00

support eq&ne for orm

This commit is contained in:
空见 2015-06-09 10:18:21 +08:00
parent 364cacf659
commit bbb6f31f16
4 changed files with 8 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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