Skip to content

Commit

Permalink
feat: implement fmt.Stringer queries
Browse files Browse the repository at this point in the history
- RawQuery
- CreateTableQuery
  • Loading branch information
bevzzz committed Oct 27, 2024
1 parent 8857bab commit 5060e47
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions query_raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,12 @@ func (q *RawQuery) AppendQuery(fmter schema.Formatter, b []byte) ([]byte, error)
func (q *RawQuery) Operation() string {
return "SELECT"
}

func (q *RawQuery) String() string {
buf, err := q.AppendQuery(q.db.Formatter(), nil)
if err != nil {
panic(err)
}

return string(buf)
}

0 comments on commit 5060e47

Please sign in to comment.