@@ -251,9 +251,7 @@ func (d *BaseDatabase) RenameTable(ctx *sql.Context, oldName, newName string) er
251251
252252func (d * BaseDatabase ) GetTriggers (ctx * sql.Context ) ([]sql.TriggerDefinition , error ) {
253253 var triggers []sql.TriggerDefinition
254- for _ , def := range d .triggers {
255- triggers = append (triggers , def )
256- }
254+ triggers = append (triggers , d .triggers ... )
257255 return triggers , nil
258256}
259257
@@ -291,9 +289,7 @@ func (d *BaseDatabase) GetStoredProcedure(ctx *sql.Context, name string) (sql.St
291289// GetStoredProcedures implements sql.StoredProcedureDatabase
292290func (d * BaseDatabase ) GetStoredProcedures (ctx * sql.Context ) ([]sql.StoredProcedureDetails , error ) {
293291 var spds []sql.StoredProcedureDetails
294- for _ , spd := range d .storedProcedures {
295- spds = append (spds , spd )
296- }
292+ spds = append (spds , d .storedProcedures ... )
297293 return spds , nil
298294}
299295
@@ -340,9 +336,7 @@ func (d *BaseDatabase) GetEvent(ctx *sql.Context, name string) (sql.EventDefinit
340336// GetEvents implements sql.EventDatabase
341337func (d * BaseDatabase ) GetEvents (ctx * sql.Context ) ([]sql.EventDefinition , error ) {
342338 var eds []sql.EventDefinition
343- for _ , ed := range d .events {
344- eds = append (eds , ed )
345- }
339+ eds = append (eds , d .events ... )
346340 return eds , nil
347341}
348342
0 commit comments