Add lq, rq, and indexplaceholders args everywhere
This commit is contained in:
parent
f14301de7b
commit
793522650c
23 changed files with 160 additions and 92 deletions
bdb/drivers
|
@ -89,12 +89,12 @@ func (p *PostgresDriver) TableNames(schema string, whitelist, blacklist []string
|
|||
query := fmt.Sprintf(`select table_name from information_schema.tables where table_schema = $1`)
|
||||
args := []interface{}{schema}
|
||||
if len(whitelist) > 0 {
|
||||
query += fmt.Sprintf(" and table_name in (%s);", strmangle.Placeholders(len(whitelist), 2, 1))
|
||||
query += fmt.Sprintf(" and table_name in (%s);", strmangle.Placeholders(true, len(whitelist), 2, 1))
|
||||
for _, w := range whitelist {
|
||||
args = append(args, w)
|
||||
}
|
||||
} else if len(blacklist) > 0 {
|
||||
query += fmt.Sprintf(" and table_name not in (%s);", strmangle.Placeholders(len(blacklist), 2, 1))
|
||||
query += fmt.Sprintf(" and table_name not in (%s);", strmangle.Placeholders(true, len(blacklist), 2, 1))
|
||||
for _, b := range blacklist {
|
||||
args = append(args, b)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue