-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Requirements
- Not all columns may be used in queries.
WHERE
clause used in statements must be adjustable. Default forDELETE
for example isid IN (?)
at the moment.- Executed query should be replaceable, e.g.
ON DUPLICATE KEY
may specifycol = col + VALUES(col)
. - All functionality shall be usable w/o building custom types, e.g. table name, columns as
string
,[]string
.
Possible API
// Using query builder directly
sql := NewQueryBuilder(db, subject).SetColumns(columns).Insert()
db.NamedBulkExec(ctx, sql, ch)
// Functional options
db.Upsert(ctx, ch, options.SetColumns(columns))
// Using query builder directly #2
upsert := qb.Upsert(subject).Columns(columns)
db.NamedBulkExec(ctx, upsert, ch)
// or
upsert.Stream(ctx, db, ch)
db.Upsert().Columns(columns).Exec() // .Stream()
qb.Upsert().Columns().Exec(ctx, db, setofData) // .Stream(ctx, db, ch)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request