This commit is contained in:
parent
08c6d20559
commit
b43a8b47e2
@ -262,9 +262,9 @@ func ToSlice(qrz Qrz) (out []string) {
|
|||||||
type Qrz struct {
|
type Qrz struct {
|
||||||
ID int `db:"id" xorm:"pk autoincr"`
|
ID int `db:"id" xorm:"pk autoincr"`
|
||||||
QRZ string `db:"qrz" xorm:"index notnull"`
|
QRZ string `db:"qrz" xorm:"index notnull"`
|
||||||
DMRID string `db:"dmrid" xorm:"notnull"`
|
DMRID string `db:"dmrid" xorm:"index notnull"`
|
||||||
Name string `db:"name" xorm:"index notnull"`
|
Name string `db:"name" xorm:"index notnull"`
|
||||||
Address string `db:"address" xorm:"notnull"`
|
Address string `db:"address" xorm:"index notnull"`
|
||||||
City string `db:"city" xorm:"index notnull"`
|
City string `db:"city" xorm:"index notnull"`
|
||||||
Zipcode string `db:"zipcode" xorm:"index varchar(5) notnull"`
|
Zipcode string `db:"zipcode" xorm:"index varchar(5) notnull"`
|
||||||
Dept string `db:"dept" xorm:"index notnull"`
|
Dept string `db:"dept" xorm:"index notnull"`
|
||||||
|
@ -226,9 +226,9 @@ func SetSearchLike(config config.Config, qrzdt *QrzDatatableInput) (searchstmt s
|
|||||||
var searchstr string
|
var searchstr string
|
||||||
switch config.DbType {
|
switch config.DbType {
|
||||||
case "sqlite3":
|
case "sqlite3":
|
||||||
searchstr = "%s LIKE '%%%s%%'"
|
searchstr = "%s LIKE '%s%%'"
|
||||||
case "mysql":
|
case "mysql":
|
||||||
searchstr = "%s LIKE '%%%s%%'"
|
searchstr = "%s LIKE '%s%%'"
|
||||||
case "postgresql":
|
case "postgresql":
|
||||||
searchstr = "%s ~* '%s'"
|
searchstr = "%s ~* '%s'"
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user