Encode json values implicitly in the sql queries according the golang json package spec.
This commit is contained in:
parent
9616bb5cfe
commit
17646ca99c
54 changed files with 1446 additions and 744 deletions
|
|
@ -61,6 +61,16 @@ func (s *SQLBuilder) WriteProjections(statement StatementType, projections []Pro
|
|||
s.DecreaseIdent()
|
||||
}
|
||||
|
||||
func (s *SQLBuilder) WriteRowToJsonProjections(statement StatementType, projections []Projection) {
|
||||
for i, projection := range projections {
|
||||
if i > 0 {
|
||||
s.WriteString(",")
|
||||
s.NewLine()
|
||||
}
|
||||
projection.serializeForRowToJsonProjection(statement, s)
|
||||
}
|
||||
}
|
||||
|
||||
// NewLine adds new line to output SQL
|
||||
func (s *SQLBuilder) NewLine() {
|
||||
s.write([]byte{'\n'})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue