fix typo chainable_api.go

This commit is contained in:
Yikakia 2023-04-25 22:14:33 +08:00
parent 32fc201554
commit 3d7256a92a
No known key found for this signature in database
GPG Key ID: DFDC30B1E1CEF44A

View File

@ -60,7 +60,7 @@ var tableRegexp = regexp.MustCompile(`(?i)(?:.+? AS (\w+)\s*(?:$|,)|^\w+\s+(\w+)
// Table specify the table you would like to run db operations // Table specify the table you would like to run db operations
// //
// // Get a user // // Get a user
// db.Table("users").take(&result) // db.Table("users").Take(&result)
func (db *DB) Table(name string, args ...interface{}) (tx *DB) { func (db *DB) Table(name string, args ...interface{}) (tx *DB) {
tx = db.getInstance() tx = db.getInstance()
if strings.Contains(name, " ") || strings.Contains(name, "`") || len(args) > 0 { if strings.Contains(name, " ") || strings.Contains(name, "`") || len(args) > 0 {