Browse Source

Merge branch 'master' of ssh://git.tetele.net:4001/tgo/dbquery

master v0.12.2
guzeng 1 year ago
parent
commit
6cc83234ed
2 changed files with 12 additions and 0 deletions
  1. +6
    -0
      chain.go
  2. +6
    -0
      transaction_chain.go

+ 6
- 0
chain.go View File

@ -197,6 +197,7 @@ func (this *Query) Clean() *Query {
this.save_data = this.save_data[0:0]
this.upd_field = this.upd_field[0:0]
this.having = ""
this.alias = ""
return this
}
@ -266,6 +267,11 @@ func (this *Query) GetTableInfo(table string) (map[string]interface{}, error) {
}, nil
}
// 返回表名
func (this *Query) GetTableName(table string) string {
return getTableName(this.dbname, table)
}
// 构造子查询
func (this *Query) BuildSelectSql() (map[string]interface{}, error) {
if this.dbname == "" && this.table == "" {


+ 6
- 0
transaction_chain.go View File

@ -197,9 +197,15 @@ func (this *TxQuery) Clean() *TxQuery {
this.save_data = this.save_data[0:0]
this.upd_field = this.upd_field[0:0]
this.having = ""
this.alias = ""
return this
}
// 返回表名
func (this *TxQuery) GetTableName(table string) string {
return getTableName(this.dbname, table)
}
// 构造子查询
func (this *TxQuery) BuildSelectSql() (map[string]interface{}, error) {
if this.dbname == "" && this.table == "" {


Loading…
Cancel
Save