1
0

parse_windows.go 614 B

12345678910111213141516171819202122232425262728293031
  1. //go:build windows
  2. // +build windows
  3. package postgresql
  4. import (
  5. "errors"
  6. "io"
  7. "github.com/kyleconroy/sqlc/internal/metadata"
  8. "github.com/kyleconroy/sqlc/internal/sql/ast"
  9. )
  10. func NewParser() *Parser {
  11. return &Parser{}
  12. }
  13. type Parser struct {
  14. }
  15. func (p *Parser) Parse(r io.Reader) ([]ast.Statement, error) {
  16. return nil, errors.New("the PostgreSQL engine does not support Windows")
  17. }
  18. // https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-COMMENTS
  19. func (p *Parser) CommentSyntax() metadata.CommentSyntax {
  20. return metadata.CommentSyntax{
  21. Dash: true,
  22. SlashStar: true,
  23. }
  24. }