Skip to content

Commit

Permalink
fix:: rename to sql
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkgos committed Aug 3, 2023
1 parent 63dad52 commit 60c15d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions driver/mysql/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import (
var _ driver.Driver = (*SQL)(nil)

type SQL struct {
CreateTableSQL string
SQL string
}

// InspectSchema implements driver.Driver.
func (self *SQL) InspectSchema(context.Context, *schema.InspectOptions) (ens.Schemaer, error) {
statement, err := sqlparser.Parse(self.CreateTableSQL)
statement, err := sqlparser.Parse(self.SQL)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion driver/mysql/sql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func Test_SQL_Parse(t *testing.T) {
")ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='公告-面向所有人的消息';"

d := &SQL{
CreateTableSQL: sql,
SQL: sql,
}
value, err := d.InspectSchema(context.Background(), nil)
if err != nil {
Expand Down

0 comments on commit 60c15d1

Please sign in to comment.