types.go 17.4 KB
Newer Older
A
astaxie 已提交
1
// Copyright 2014 beego Author. All Rights Reserved.
A
astaxie 已提交
2
//
A
astaxie 已提交
3 4 5
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
A
astaxie 已提交
6
//
A
astaxie 已提交
7
//      http://www.apache.org/licenses/LICENSE-2.0
A
astaxie 已提交
8
//
A
astaxie 已提交
9 10 11 12 13 14
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

S
slene 已提交
15 16 17
package orm

import (
P
Penghui Liao 已提交
18
	"context"
S
slene 已提交
19 20
	"database/sql"
	"reflect"
21
	"time"
S
slene 已提交
22 23
)

A
astaxie 已提交
24
// Driver define database driver
S
slene 已提交
25 26 27 28 29
type Driver interface {
	Name() string
	Type() DriverType
}

A
astaxie 已提交
30
// Fielder define field info
S
slene 已提交
31 32 33 34 35 36 37
type Fielder interface {
	String() string
	FieldType() int
	SetRaw(interface{}) error
	RawValue() interface{}
}

A
astaxie 已提交
38
// Ormer define the orm interface
S
slene 已提交
39
type Ormer interface {
nkbai's avatar
nkbai 已提交
40 41 42 43 44 45 46 47 48
	// read data to model
	// for example:
	//	this will find User by Id field
	// 	u = &User{Id: user.Id}
	// 	err = Ormer.Read(u)
	//	this will find User by UserName field
	// 	u = &User{UserName: "astaxie", Password: "pass"}
	//	err = Ormer.Read(u, "UserName")
	Read(md interface{}, cols ...string) error
49 50 51
	// Like Read(), but with "FOR UPDATE" clause, useful in transaction.
	// Some databases are not support this feature.
	ReadForUpdate(md interface{}, cols ...string) error
nkbai's avatar
nkbai 已提交
52 53 54 55 56 57 58
	// Try to read a row from the database, or insert one if it doesn't exist
	ReadOrCreate(md interface{}, col1 string, cols ...string) (bool, int64, error)
	// insert model data to database
	// for example:
	//  user := new(User)
	//  id, err = Ormer.Insert(user)
	//  user must a pointer and Insert will set user's pk field
59
	Insert(interface{}) (int64, error)
“fudali113” 已提交
60 61 62 63
	// mysql:InsertOrUpdate(model) or InsertOrUpdate(model,"colu=colu+value")
	// if colu type is integer : can use(+-*/), string : convert(colu,"value")
	// postgres: InsertOrUpdate(model,"conflictColumnName") or InsertOrUpdate(model,"conflictColumnName","colu=colu+value")
	// if colu type is integer : can use(+-*/), string : colu || "value"
“fudali113” 已提交
64
	InsertOrUpdate(md interface{}, colConflitAndArgs ...string) (int64, error)
nkbai's avatar
nkbai 已提交
65 66 67 68 69 70 71 72 73 74 75 76 77
	// insert some models to database
	InsertMulti(bulk int, mds interface{}) (int64, error)
	// update model to database.
	// cols set the columns those want to update.
	// find model by Id(pk) field and update columns specified by fields, if cols is null then update all columns
	// for example:
	// user := User{Id: 2}
	//	user.Langs = append(user.Langs, "zh-CN", "en-US")
	//	user.Extra.Name = "beego"
	//	user.Extra.Data = "orm"
	//	num, err = Ormer.Update(&user, "Langs", "Extra")
	Update(md interface{}, cols ...string) (int64, error)
	// delete model in database
A
astaxie 已提交
78
	Delete(md interface{}, cols ...string) (int64, error)
nkbai's avatar
nkbai 已提交
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
	// load related models to md model.
	// args are limit, offset int and order string.
	//
	// example:
	// 	Ormer.LoadRelated(post,"Tags")
	// 	for _,tag := range post.Tags{...}
	//args[0] bool true useDefaultRelsDepth ; false  depth 0
	//args[0] int  loadRelationDepth
	//args[1] int limit default limit 1000
	//args[2] int offset default offset 0
	//args[3] string order  for example : "-Id"
	// make sure the relation is defined in model struct tags.
	LoadRelated(md interface{}, name string, args ...interface{}) (int64, error)
	// create a models to models queryer
	// for example:
	// 	post := Post{Id: 4}
	// 	m2m := Ormer.QueryM2M(&post, "Tags")
	QueryM2M(md interface{}, name string) QueryM2Mer
	// return a QuerySeter for table operations.
	// table name can be string or struct.
	// e.g. QueryTable("user"), QueryTable(&user{}) or QueryTable((*User)(nil)),
	QueryTable(ptrStructOrTableName interface{}) QuerySeter
	// switch to another registered database driver by given name.
	Using(name string) error
	// begin transaction
	// for example:
	// 	o := NewOrm()
	// 	err := o.Begin()
	// 	...
	// 	err = o.Rollback()
S
slene 已提交
109
	Begin() error
P
Penghui Liao 已提交
110 111 112 113 114 115 116 117 118 119 120
	// begin transaction with provided context and option
	// the provided context is used until the transaction is committed or rolled back.
	// if the context is canceled, the transaction will be rolled back.
	// the provided TxOptions is optional and may be nil if defaults should be used.
	// if a non-default isolation level is used that the driver doesn't support, an error will be returned.
	// for example:
	//  o := NewOrm()
	// 	err := o.BeginTx(context.Background(), &sql.TxOptions{Isolation: sql.LevelRepeatableRead})
	//  ...
	//  err = o.Rollback()
	BeginTx(ctx context.Context, opts *sql.TxOptions) error
nkbai's avatar
nkbai 已提交
121
	// commit transaction
S
slene 已提交
122
	Commit() error
nkbai's avatar
nkbai 已提交
123
	// rollback transaction
S
slene 已提交
124
	Rollback() error
nkbai's avatar
nkbai 已提交
125 126 127 128 129
	// return a raw query seter for raw sql string.
	// for example:
	//	 ormer.Raw("UPDATE `user` SET `user_name` = ? WHERE `user_name` = ?", "slene", "testing").Exec()
	//	// update user testing's name to slene
	Raw(query string, args ...interface{}) RawSeter
S
slene 已提交
130
	Driver() Driver
S
slene 已提交
131 132
}

A
astaxie 已提交
133
// Inserter insert prepared statement
S
slene 已提交
134
type Inserter interface {
135
	Insert(interface{}) (int64, error)
S
slene 已提交
136 137 138
	Close() error
}

A
astaxie 已提交
139
// QuerySeter query seter
S
slene 已提交
140
type QuerySeter interface {
nkbai's avatar
nkbai 已提交
141 142 143 144 145 146 147 148
	// add condition expression to QuerySeter.
	// for example:
	//	filter by UserName == 'slene'
	//	qs.Filter("UserName", "slene")
	//	sql : left outer join profile on t0.id1==t1.id2 where t1.age == 28
	//	Filter("profile__Age", 28)
	// 	 // time compare
	//	qs.Filter("created", time.Now())
S
slene 已提交
149
	Filter(string, ...interface{}) QuerySeter
nkbai's avatar
nkbai 已提交
150 151
	// add NOT condition to querySeter.
	// have the same usage as Filter
S
slene 已提交
152
	Exclude(string, ...interface{}) QuerySeter
nkbai's avatar
nkbai 已提交
153 154 155 156 157 158
	// set condition to QuerySeter.
	// sql's where condition
	//	cond := orm.NewCondition()
	//	cond1 := cond.And("profile__isnull", false).AndNot("status__in", 1).Or("profile__age__gt", 2000)
	//	//sql-> WHERE T0.`profile_id` IS NOT NULL AND NOT T0.`Status` IN (?) OR T1.`age` >  2000
	//	num, err := qs.SetCond(cond1).Count()
S
slene 已提交
159
	SetCond(*Condition) QuerySeter
K
kerwin 已提交
160 161 162 163 164 165 166 167 168 169
	// get condition from QuerySeter.
	// sql's where condition
	//  cond := orm.NewCondition()
	//  cond = cond.And("profile__isnull", false).AndNot("status__in", 1)
	//  qs = qs.SetCond(cond)
	//  cond = qs.GetCond()
	//  cond := cond.Or("profile__age__gt", 2000)
	//  //sql-> WHERE T0.`profile_id` IS NOT NULL AND NOT T0.`Status` IN (?) OR T1.`age` >  2000
	//  num, err := qs.SetCond(cond).Count()
	GetCond() *Condition
nkbai's avatar
nkbai 已提交
170 171 172 173 174 175 176 177 178 179 180
	// add LIMIT value.
	// args[0] means offset, e.g. LIMIT num,offset.
	// if Limit <= 0 then Limit will be set to default limit ,eg 1000
	// if QuerySeter doesn't call Limit, the sql's Limit will be set to default limit, eg 1000
	//  for example:
	//	qs.Limit(10, 2)
	//	// sql-> limit 10 offset 2
	Limit(limit interface{}, args ...interface{}) QuerySeter
	// add OFFSET value
	// same as Limit function's args[0]
	Offset(offset interface{}) QuerySeter
T
Thanh Tran 已提交
181 182 183 184
	// add GROUP BY expression
	// for example:
	//	qs.GroupBy("id")
	GroupBy(exprs ...string) QuerySeter
nkbai's avatar
nkbai 已提交
185 186 187 188 189 190 191 192 193 194 195 196 197 198
	// add ORDER expression.
	// "column" means ASC, "-column" means DESC.
	// for example:
	//	qs.OrderBy("-status")
	OrderBy(exprs ...string) QuerySeter
	// set relation model to query together.
	// it will query relation models and assign to parent model.
	// for example:
	//	// will load all related fields use left join .
	// 	qs.RelatedSel().One(&user)
	//	// will  load related field only profile
	//	qs.RelatedSel("profile").One(&user)
	//	user.Profile.Age = 32
	RelatedSel(params ...interface{}) QuerySeter
A
astaxie 已提交
199 200 201 202 203 204
	// Set Distinct
	// for example:
	//  o.QueryTable("policy").Filter("Groups__Group__Users__User", user).
	//    Distinct().
	//    All(&permissions)
	Distinct() QuerySeter
205 206 207 208
	// set FOR UPDATE to query.
	// for example:
	//  o.QueryTable("user").Filter("uid", uid).ForUpdate().All(&users)
	ForUpdate() QuerySeter
nkbai's avatar
nkbai 已提交
209 210 211
	// return QuerySeter execution result number
	// for example:
	//	num, err = qs.Filter("profile__age__gt", 28).Count()
S
slene 已提交
212
	Count() (int64, error)
nkbai's avatar
nkbai 已提交
213 214
	// check result empty or not after QuerySeter executed
	// the same as QuerySeter.Count > 0
S
slene 已提交
215
	Exist() bool
nkbai's avatar
nkbai 已提交
216 217 218 219 220 221 222 223 224 225 226 227 228
	// execute update with parameters
	// for example:
	//	num, err = qs.Filter("user_name", "slene").Update(Params{
	//		"Nums": ColValue(Col_Minus, 50),
	//	}) // user slene's Nums will minus 50
	//	num, err = qs.Filter("UserName", "slene").Update(Params{
	//		"user_name": "slene2"
	//	}) // user slene's  name will change to slene2
	Update(values Params) (int64, error)
	// delete from table
	//for example:
	//	num ,err = qs.Filter("user_name__in", "testing1", "testing2").Delete()
	// 	//delete two user  who's name is testing1 or testing2
S
slene 已提交
229
	Delete() (int64, error)
nkbai's avatar
nkbai 已提交
230 231 232 233 234 235 236
	// return a insert queryer.
	// it can be used in times.
	// example:
	// 	i,err := sq.PrepareInsert()
	// 	num, err = i.Insert(&user1) // user table will add one record user1 at once
	//	num, err = i.Insert(&user2) // user table will add one record user2 at once
	//	err = i.Close() //don't forget call Close
S
slene 已提交
237
	PrepareInsert() (Inserter, error)
nkbai's avatar
nkbai 已提交
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290
	// query all data and map to containers.
	// cols means the columns when querying.
	// for example:
	//	var users []*User
	//	qs.All(&users) // users[0],users[1],users[2] ...
	All(container interface{}, cols ...string) (int64, error)
	// query one row data and map to containers.
	// cols means the columns when querying.
	// for example:
	//	var user User
	//	qs.One(&user) //user.UserName == "slene"
	One(container interface{}, cols ...string) error
	// query all data and map to []map[string]interface.
	// expres means condition expression.
	// it converts data to []map[column]value.
	// for example:
	//	var maps []Params
	//	qs.Values(&maps) //maps[0]["UserName"]=="slene"
	Values(results *[]Params, exprs ...string) (int64, error)
	// query all data and map to [][]interface
	// it converts data to [][column_index]value
	// for example:
	//	var list []ParamsList
	//	qs.ValuesList(&list) // list[0][1] == "slene"
	ValuesList(results *[]ParamsList, exprs ...string) (int64, error)
	// query all data and map to []interface.
	// it's designed for one column record set, auto change to []value, not [][column]value.
	// for example:
	//	var list ParamsList
	//	qs.ValuesFlat(&list, "UserName") // list[0] == "slene"
	ValuesFlat(result *ParamsList, expr string) (int64, error)
	// query all rows into map[string]interface with specify key and value column name.
	// keyCol = "name", valueCol = "value"
	// table data
	// name  | value
	// total | 100
	// found | 200
	// to map[string]interface{}{
	// 	"total": 100,
	// 	"found": 200,
	// }
	RowsToMap(result *Params, keyCol, valueCol string) (int64, error)
	// query all rows into struct with specify key and value column name.
	// keyCol = "name", valueCol = "value"
	// table data
	// name  | value
	// total | 100
	// found | 200
	// to struct {
	// 	Total int
	// 	Found int
	// }
	RowsToStruct(ptrStruct interface{}, keyCol, valueCol string) (int64, error)
S
slene 已提交
291 292
}

nkbai's avatar
nkbai 已提交
293
// QueryM2Mer model to model query struct
nkbai's avatar
nkbai 已提交
294
// all operations are on the m2m table only, will not affect the origin model table
295
type QueryM2Mer interface {
nkbai's avatar
nkbai 已提交
296 297 298 299 300 301 302 303 304 305 306
	// add models to origin models when creating queryM2M.
	// example:
	// 	m2m := orm.QueryM2M(post,"Tag")
	// 	m2m.Add(&Tag1{},&Tag2{})
	//  	for _,tag := range post.Tags{}{ ... }
	// param could also be any of the follow
	// 	[]*Tag{{Id:3,Name: "TestTag1"}, {Id:4,Name: "TestTag2"}}
	//	&Tag{Id:5,Name: "TestTag3"}
	//	[]interface{}{&Tag{Id:6,Name: "TestTag4"}}
	// insert one or more rows to m2m table
	// make sure the relation is defined in post model struct tag.
307
	Add(...interface{}) (int64, error)
nkbai's avatar
nkbai 已提交
308 309 310 311 312
	// remove models following the origin model relationship
	// only delete rows from m2m table
	// for example:
	//tag3 := &Tag{Id:5,Name: "TestTag3"}
	//num, err = m2m.Remove(tag3)
313
	Remove(...interface{}) (int64, error)
nkbai's avatar
nkbai 已提交
314
	// check model is existed in relationship of origin model
315
	Exist(interface{}) bool
nkbai's avatar
nkbai 已提交
316
	// clean all models in related of origin model
317
	Clear() (int64, error)
nkbai's avatar
nkbai 已提交
318
	// count all related models of origin model
319 320 321
	Count() (int64, error)
}

A
astaxie 已提交
322
// RawPreparer raw query statement
S
slene 已提交
323
type RawPreparer interface {
324
	Exec(...interface{}) (sql.Result, error)
S
slene 已提交
325 326 327
	Close() error
}

nkbai's avatar
nkbai 已提交
328
// RawSeter raw query seter
nkbai's avatar
nkbai 已提交
329 330 331 332
// create From Ormer.Raw
// for example:
//  sql := fmt.Sprintf("SELECT %sid%s,%sname%s FROM %suser%s WHERE id = ?",Q,Q,Q,Q,Q,Q)
//  rs := Ormer.Raw(sql, 1)
S
slene 已提交
333
type RawSeter interface {
nkbai's avatar
nkbai 已提交
334
	//execute sql and get result
335
	Exec() (sql.Result, error)
nkbai's avatar
nkbai 已提交
336 337 338 339 340 341 342 343 344 345 346 347 348
	//query data and map to container
	//for example:
	//	var name string
	//	var id int
	//	rs.QueryRow(&id,&name) // id==2 name=="slene"
	QueryRow(containers ...interface{}) error

	// query data rows and map to container
	//	var ids []int
	//	var names []int
	//	query = fmt.Sprintf("SELECT 'id','name' FROM %suser%s", Q, Q)
	//	num, err = dORM.Raw(query).QueryRows(&ids,&names) // ids=>{1,2},names=>{"nobody","slene"}
	QueryRows(containers ...interface{}) (int64, error)
S
slene 已提交
349
	SetArgs(...interface{}) RawSeter
nkbai's avatar
nkbai 已提交
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385
	// query data to []map[string]interface
	// see QuerySeter's Values
	Values(container *[]Params, cols ...string) (int64, error)
	// query data to [][]interface
	// see QuerySeter's ValuesList
	ValuesList(container *[]ParamsList, cols ...string) (int64, error)
	// query data to []interface
	// see QuerySeter's ValuesFlat
	ValuesFlat(container *ParamsList, cols ...string) (int64, error)
	// query all rows into map[string]interface with specify key and value column name.
	// keyCol = "name", valueCol = "value"
	// table data
	// name  | value
	// total | 100
	// found | 200
	// to map[string]interface{}{
	// 	"total": 100,
	// 	"found": 200,
	// }
	RowsToMap(result *Params, keyCol, valueCol string) (int64, error)
	// query all rows into struct with specify key and value column name.
	// keyCol = "name", valueCol = "value"
	// table data
	// name  | value
	// total | 100
	// found | 200
	// to struct {
	// 	Total int
	// 	Found int
	// }
	RowsToStruct(ptrStruct interface{}, keyCol, valueCol string) (int64, error)

	// return prepared raw statement for used in times.
	// for example:
	// 	pre, err := dORM.Raw("INSERT INTO tag (name) VALUES (?)").Prepare()
	// 	r, err := pre.Exec("name1") // INSERT INTO tag (name) VALUES (`name1`)
S
slene 已提交
386 387 388
	Prepare() (RawPreparer, error)
}

A
astaxie 已提交
389
// stmtQuerier statement querier
S
slene 已提交
390 391 392
type stmtQuerier interface {
	Close() error
	Exec(args ...interface{}) (sql.Result, error)
N
nlimpid 已提交
393
	//ExecContext(ctx context.Context, args ...interface{}) (sql.Result, error)
S
slene 已提交
394
	Query(args ...interface{}) (*sql.Rows, error)
N
nlimpid 已提交
395
	//QueryContext(args ...interface{}) (*sql.Rows, error)
S
slene 已提交
396
	QueryRow(args ...interface{}) *sql.Row
N
nlimpid 已提交
397
	//QueryRowContext(ctx context.Context, args ...interface{}) *sql.Row
S
slene 已提交
398 399
}

F
FuXiaoHei 已提交
400
// db querier
S
slene 已提交
401 402
type dbQuerier interface {
	Prepare(query string) (*sql.Stmt, error)
N
nlimpid 已提交
403
	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
S
slene 已提交
404
	Exec(query string, args ...interface{}) (sql.Result, error)
N
nlimpid 已提交
405
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
S
slene 已提交
406
	Query(query string, args ...interface{}) (*sql.Rows, error)
N
nlimpid 已提交
407
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
S
slene 已提交
408
	QueryRow(query string, args ...interface{}) *sql.Row
N
nlimpid 已提交
409
	QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
S
slene 已提交
410 411
}

412 413 414 415 416 417 418 419
// type DB interface {
// 	Begin() (*sql.Tx, error)
// 	Prepare(query string) (stmtQuerier, error)
// 	Exec(query string, args ...interface{}) (sql.Result, error)
// 	Query(query string, args ...interface{}) (*sql.Rows, error)
// 	QueryRow(query string, args ...interface{}) *sql.Row
// }

F
FuXiaoHei 已提交
420
// transaction beginner
S
slene 已提交
421 422
type txer interface {
	Begin() (*sql.Tx, error)
P
Penghui Liao 已提交
423
	BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
S
slene 已提交
424 425
}

F
FuXiaoHei 已提交
426
// transaction ending
S
slene 已提交
427 428 429 430 431
type txEnder interface {
	Commit() error
	Rollback() error
}

F
FuXiaoHei 已提交
432
// base database struct
S
slene 已提交
433
type dbBaser interface {
434
	Read(dbQuerier, *modelInfo, reflect.Value, *time.Location, []string, bool) error
435
	Insert(dbQuerier, *modelInfo, reflect.Value, *time.Location) (int64, error)
436
	InsertOrUpdate(dbQuerier, *modelInfo, reflect.Value, *alias, ...string) (int64, error)
S
slene 已提交
437 438
	InsertMulti(dbQuerier, *modelInfo, reflect.Value, int, *time.Location) (int64, error)
	InsertValue(dbQuerier, *modelInfo, bool, []string, []interface{}) (int64, error)
439
	InsertStmt(stmtQuerier, *modelInfo, reflect.Value, *time.Location) (int64, error)
440
	Update(dbQuerier, *modelInfo, reflect.Value, *time.Location, []string) (int64, error)
A
astaxie 已提交
441
	Delete(dbQuerier, *modelInfo, reflect.Value, *time.Location, []string) (int64, error)
442
	ReadBatch(dbQuerier, *querySet, *modelInfo, *Condition, interface{}, *time.Location, []string) (int64, error)
443
	SupportUpdateJoin() bool
444 445 446
	UpdateBatch(dbQuerier, *querySet, *modelInfo, *Condition, Params, *time.Location) (int64, error)
	DeleteBatch(dbQuerier, *querySet, *modelInfo, *Condition, *time.Location) (int64, error)
	Count(dbQuerier, *querySet, *modelInfo, *Condition, *time.Location) (int64, error)
A
astaxie 已提交
447 448
	OperatorSQL(string) string
	GenerateOperatorSQL(*modelInfo, *fieldInfo, string, []interface{}, *time.Location) (string, []interface{})
449
	GenerateOperatorLeftCol(*fieldInfo, string, *string)
S
slene 已提交
450
	PrepareInsert(dbQuerier, *modelInfo) (stmtQuerier, string, error)
451
	ReadValues(dbQuerier, *querySet, *modelInfo, *Condition, []string, interface{}, *time.Location) (int64, error)
452
	RowsTo(dbQuerier, *querySet, *modelInfo, *Condition, interface{}, string, string, *time.Location) (int64, error)
453 454 455
	MaxLimit() uint64
	TableQuote() string
	ReplaceMarks(*string)
S
slene 已提交
456
	HasReturningID(*modelInfo, *string) bool
457 458
	TimeFromDB(*time.Time, *time.Location)
	TimeToDB(*time.Time, *time.Location)
S
slene 已提交
459
	DbTypes() map[string]string
S
slene 已提交
460 461 462 463 464
	GetTables(dbQuerier) (map[string]bool, error)
	GetColumns(dbQuerier, string) (map[string][3]string, error)
	ShowTablesQuery() string
	ShowColumnsQuery(string) string
	IndexExists(dbQuerier, string, string) bool
465
	collectFieldValue(*modelInfo, *fieldInfo, reflect.Value, bool, *time.Location) (interface{}, error)
M
miraclesu 已提交
466
	setval(dbQuerier, *modelInfo, []string) error
S
slene 已提交
467
}