We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34eb10a commit 186b108Copy full SHA for 186b108
internal/infra/query/sql.go
@@ -88,14 +88,16 @@ func (ds *DataSource) Close() error {
88
}
89
90
func (ds *DataSource) Query(query string) (query.DataReader, error) {
91
- rows, err := ds.dbx.Queryx(query)
+ result, err := ds.dbx.Exec(query)
92
if err != nil {
93
return nil, fmt.Errorf("%w", err)
94
95
96
- log.Info().Str("query", query).Msg("success executing SQL query")
+ if nbrows, err := result.RowsAffected(); err != nil {
97
+ log.Info().Str("query", query).Int64("rows", nbrows).Msg("success executing SQL query")
98
+ }
99
- return &DataReader{rows, nil, nil}, nil
100
+ return nil, nil
101
102
103
type DataSourceFactory struct{}
0 commit comments