1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 18:50:49 +00:00
Beego/orm/db_sqlite.go

41 lines
832 B
Go
Raw Normal View History

2013-07-30 12:32:38 +00:00
package orm
var sqliteOperators = map[string]string{
"exact": "= ?",
"iexact": "LIKE ? ESCAPE '\\'",
"contains": "LIKE ? ESCAPE '\\'",
"icontains": "LIKE ? ESCAPE '\\'",
"gt": "> ?",
"gte": ">= ?",
"lt": "< ?",
"lte": "<= ?",
"startswith": "LIKE ? ESCAPE '\\'",
"endswith": "LIKE ? ESCAPE '\\'",
"istartswith": "LIKE ? ESCAPE '\\'",
"iendswith": "LIKE ? ESCAPE '\\'",
}
2013-07-30 12:32:38 +00:00
type dbBaseSqlite struct {
dbBase
}
var _ dbBaser = new(dbBaseSqlite)
func (d *dbBaseSqlite) OperatorSql(operator string) string {
return sqliteOperators[operator]
}
func (d *dbBaseSqlite) SupportUpdateJoin() bool {
return false
}
func (d *dbBaseSqlite) MaxLimit() uint64 {
return 9223372036854775807
}
2013-07-30 12:32:38 +00:00
func newdbBaseSqlite() dbBaser {
b := new(dbBaseSqlite)
b.ins = b
return b
}