Skip to content

Commit d953c05

Browse files
authored
fix: escape table name on create (#18)
1 parent bff3ba3 commit d953c05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func readLastInsert(ctx context.Context, query QueryFn, record interface{}, resu
8484
}
8585

8686
params := []interface{}{
87-
fmt.Sprintf("SELECT * FROM %s WHERE %s = ?", table.SQLName, table.PrimaryKeyField().SQL.Name),
87+
fmt.Sprintf("SELECT * FROM `%s` WHERE `%s` = ?", table.SQLName, table.PrimaryKeyField().SQL.Name),
8888
id,
8989
}
9090

0 commit comments

Comments
 (0)