()
| 92 | } |
| 93 | |
| 94 | func (d *Driver) getDatabases() ([]string, error) { |
| 95 | files, err := os.ReadDir(d.dir) |
| 96 | if err != nil { |
| 97 | return nil, errors.Wrapf(err, "failed to read directory %q", d.dir) |
| 98 | } |
| 99 | var databases []string |
| 100 | for _, file := range files { |
| 101 | if file.IsDir() || !strings.HasSuffix(file.Name(), ".db") { |
| 102 | continue |
| 103 | } |
| 104 | databases = append(databases, strings.TrimSuffix(file.Name(), ".db")) |
| 105 | } |
| 106 | return databases, nil |
| 107 | } |
| 108 | |
| 109 | // Execute executes a SQL statement. |
| 110 | func (d *Driver) Execute(ctx context.Context, statement string, opts db.ExecuteOptions) (int64, error) { |
no test coverage detected