@@ -33,6 +33,11 @@ type SQL struct {
3333 Instrumenter rel.Instrumenter
3434}
3535
36+ // Name returns database adapter name.
37+ func (s SQL ) Name () string {
38+ return "sql"
39+ }
40+
3641// Instrumentation set instrumenter for this adapter.
3742func (s * SQL ) Instrumentation (instrumenter rel.Instrumenter ) {
3843 s .Instrumenter = instrumenter
@@ -173,10 +178,7 @@ func (s SQL) Query(ctx context.Context, query rel.Query) (rel.Cursor, error) {
173178
174179// Exec performs exec operation.
175180func (s SQL ) Exec (ctx context.Context , statement string , args []any ) (int64 , int64 , error ) {
176- var (
177- res , err = s .DoExec (ctx , statement , args )
178- )
179-
181+ res , err := s .DoExec (ctx , statement , args )
180182 if err != nil {
181183 return 0 , 0 , s .ErrorMapper (err )
182184 }
@@ -284,9 +286,7 @@ func (s SQL) Delete(ctx context.Context, query rel.Query) (int, error) {
284286
285287// SchemaApply performs migration to database.
286288func (s SQL ) SchemaApply (ctx context.Context , migration rel.Migration ) error {
287- var (
288- statement string
289- )
289+ var statement string
290290
291291 switch v := migration .(type ) {
292292 case rel.Table :
0 commit comments