Refactoring to support parameterized queries.
This commit is contained in:
parent
bc6a2bbcac
commit
fef8f0ef83
33 changed files with 1112 additions and 1206 deletions
|
|
@ -1,18 +1,16 @@
|
|||
package sqlbuilder
|
||||
|
||||
import "bytes"
|
||||
|
||||
type Projection interface {
|
||||
SerializeForProjection(out *bytes.Buffer) error
|
||||
SerializeForProjection(out *queryData) error
|
||||
}
|
||||
|
||||
//------------------------------------------------------//
|
||||
// Dummy type for select * AllColumns
|
||||
type ColumnList []Column
|
||||
|
||||
func (cl ColumnList) SerializeForProjection(out *bytes.Buffer) error {
|
||||
func (cl ColumnList) SerializeForProjection(out *queryData) error {
|
||||
for i, column := range cl {
|
||||
err := column.SerializeSql(out, FOR_PROJECTION)
|
||||
err := column.Serialize(out, FOR_PROJECTION)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue