genorm
genorm copied to clipboard
SQL Builder to prevent SQL mistakes using the Golang generics
Prepared StatementのプレースホルダーがMySQL/MariaDBでは`?`なのが、`$1`、`$2`、`$3`…になるのに対応する必要がある。
返り値が1つだけのSubQueryに対応する。 返り値が複数の場合は、そもそも値の組みを扱う仕組みがないので一旦後回し。 SubQuery内では - SubQueryの結果を利用するクエリのテーブル - SubQueryの対象テーブル 両方のカラムを使用可能なため、それをうまく表現する必要がある。 とりあえずSubQueryの結果を利用するクエリのテーブルのみSubQueryの対象テーブルとして良い、みたいなのもありとは思う。
クエリの実行結果をstructにbindする部分のテストができていない。 バグが発生しやすい部分なので、しっかりテストしたい。
生成されたコードに`github.com/mazrean/genorm`が二重にimportされてエラーになる事例があった。 原因を特定して直す。
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.2.0 to 4.3.0. Release notes Sourced from codecov/codecov-action's releases. v4.3.0 What's Changed fix: automatically detect if using GitHub enterprise by @thomasrockhu-codecov in codecov/codecov-action#1356 build(deps-dev): bump typescript from...
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.22.0 to 0.23.0. Commits 33be3ef go.mod: update golang.org/x dependencies 0e7ccc0 gopls/internal/golang: provide version info for stdlib in pkgdoc fcf5463 gopls/internal/server: add counters to inform v0.17.0 70a59b2 gopls/doc:...
MySQL/MariaDB use `?` placeholders in prepared statements, while PostgreSQL uses numbered placeholders (`$1`, `$2`, `$3`, ...). This change adds database-specific placeholder formatting with security-focused implementation. ## Implementation - **DBType enum**:...
Adding tests for Select result binding to structs - [x] Explored repository structure and understood the codebase - [x] Identified that binding tests are missing in select.go - [x] Generated...