Skip to content

Commit

Permalink
cmd/atlas/internal/sqlparse: move parsers out
Browse files Browse the repository at this point in the history
  • Loading branch information
a8m committed Dec 19, 2024
1 parent 0f5d486 commit bba0f62
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 1,260 deletions.
215 changes: 0 additions & 215 deletions cmd/atlas/internal/sqlparse/pgparse/pgparse.go

This file was deleted.

16 changes: 14 additions & 2 deletions cmd/atlas/internal/sqlparse/pgparse/pgparse_oss.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,22 @@
package pgparse

import (
"errors"

"ariga.io/atlas/sql/migrate"
"ariga.io/atlas/sql/schema"
pgquery "github.com/pganalyze/pg_query_go/v5"
)

func FixAlterTable(_ string, _ *pgquery.AlterTableStmt, changes schema.Changes) (schema.Changes, error) {
type Parser struct{}

func (*Parser) ColumnFilledBefore([]*migrate.Stmt, *schema.Table, *schema.Column, int) (bool, error) {
return false, errors.New("unimplemented")
}

func (*Parser) CreateViewAfter([]*migrate.Stmt, string, string, int) (bool, error) {
return false, errors.New("unimplemented")
}

func (*Parser) FixChange(_ migrate.Driver, _ string, changes schema.Changes) (schema.Changes, error) {
return changes, nil // Unimplemented.
}
Loading

0 comments on commit bba0f62

Please sign in to comment.