Remove dead query.go at project root
The QueryWriter interface and queryToString function had zero callers. The commented-out insertQueryToString was a Bob remnant. The io import was only used in this file.
This commit is contained in:
parent
7ffa2e891b
commit
93b69c4cbb
2 changed files with 2 additions and 38 deletions
|
|
@ -236,9 +236,7 @@ Verify that all code references use the external package, not a local path.
|
||||||
|
|
||||||
## 10. Old Generated Files & Artifacts
|
## 10. Old Generated Files & Artifacts
|
||||||
|
|
||||||
### 10a. `query.go` at project root
|
### 10a. `query.go` at project root — Removed ✅
|
||||||
|
|
||||||
Contains a commented-out Bob query interface and an unused `QueryWriter` interface. The `insertQueryToString` function is entirely commented out. Either repurpose or remove.
|
|
||||||
|
|
||||||
### 10b. `db/sql/` directory
|
### 10b. `db/sql/` directory
|
||||||
|
|
||||||
|
|
@ -287,7 +285,7 @@ Empty placeholder file. Remove.
|
||||||
- ~~Remove `tomtom/` (unused, no imports)~~ ✅
|
- ~~Remove `tomtom/` (unused, no imports)~~ ✅
|
||||||
- ~~Remove `build.js` (dead, replaced by Vite)~~ ✅
|
- ~~Remove `build.js` (dead, replaced by Vite)~~ ✅
|
||||||
- Remove commented-out routes in `sync/routes.go` and `rmo/routes.go`
|
- Remove commented-out routes in `sync/routes.go` and `rmo/routes.go`
|
||||||
- Remove `query.go` commented-out code
|
- ~~Remove `query.go` commented-out code~~ ✅
|
||||||
- Remove `static/gen/main.js` stale artifact
|
- Remove `static/gen/main.js` stale artifact
|
||||||
- Remove `static/css/placeholder`
|
- Remove `static/css/placeholder`
|
||||||
|
|
||||||
|
|
|
||||||
34
query.go
34
query.go
|
|
@ -1,34 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"context"
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
//"github.com/Gleipnir-Technology/bob"
|
|
||||||
//"github.com/Gleipnir-Technology/bob/dialect/psql"
|
|
||||||
)
|
|
||||||
|
|
||||||
type QueryWriter interface {
|
|
||||||
WriteQuery(ctx context.Context, w io.Writer, start int) ([]any, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
func queryToString(query QueryWriter) string {
|
|
||||||
buf := new(bytes.Buffer)
|
|
||||||
_, err := query.WriteQuery(context.TODO(), buf, 0)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Sprintf("Failed to write query to buffer: %v", err)
|
|
||||||
}
|
|
||||||
return buf.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
func insertQueryToString(query bob.BaseQuery[*dialect.InsertQuery]) string {
|
|
||||||
buf := new(bytes.Buffer)
|
|
||||||
_, err := query.WriteQuery(context.TODO(), buf, 0)
|
|
||||||
if err != nil {
|
|
||||||
return fmt.Sprintf("Failed to write query: %v", err)
|
|
||||||
}
|
|
||||||
return buf.String()
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue