Limitations
What dbswitch intentionally does not do — read before adopting.
dbswitch is intentionally small. Know what it does not do before you adopt it — for anything beyond this surface, use your driver directly. dbswitch is not meant to hide SQL you actually need.
- Results are
map[string]any. Value types are whatever the driver returns — a PostgresUUIDcomes back as[16]byte, a timestamp astime.Time. Convert at your boundary. There is no struct mapping. - Conditions are equality-only, ANDed.
WHERE col = val AND …. No<,>,OR,IN,LIKE, or joins yet. (Sorting, limits, and both cursor and offset pagination are available viaList— the cursor is the one comparison you get.) SELECT *only — you can't yet choose which columns are returned.CreateTableisCREATE TABLE IF NOT EXISTS, not migrations. No schema versioning, alters, or indexes beyond column constraints. Use a real migration tool for evolving schemas.- No transactions API.
- DynamoDB filters on non-
"id"fields cost a full-table Scan. There's no secondary index by default, soFind/List/Count/Update/Deletewith a non-key condition walk the whole table. Fine for small tables and convenience use; add a Global Secondary Index and query it directly with the AWS SDK for anything at scale. - DynamoDB only supports a single
"id"partition key — no composite (partition + sort) keys, andUniqueis only enforceable on that key.
If your needs outgrow this, drop down to your driver directly (e.g.
jackc/pgx or aws-sdk-go-v2) — dbswitch composes fine
alongside raw driver usage.