aboutsummaryrefslogtreecommitdiff
path: root/query.go
Commit message (Collapse)AuthorAgeFilesLines
* bring back support for LastInsertId-based INSERTStefan Majewsky2026-05-221-7/+30
| | | | | | As the remaining TODO noted, this really is much more memory-efficient than QueryRow when we can use it, since it does not allocate an *sql.Rows instance inside the *sql.Row instance where we call Scan().
* return a concrete type from Wrap() to enable non-Oblast DB operationsStefan Majewsky2026-05-131-1/+1
|
* Insert, Upsert, Update, Delete: do not panic on indirection through nil pointerStefan Majewsky2026-05-131-14/+53
|
* clarify docstrings, put down TODOs based on review feedbackStefan Majewsky2026-05-121-1/+6
|
* change Handle to a generic interface without explicit dep on database/sqlStefan Majewsky2026-05-121-50/+15
|
* add ctx arguments to most methodsStefan Majewsky2026-04-301-36/+37
|
* shave off some more allocationsStefan Majewsky2026-04-301-5/+5
|
* note to self: bad memory usage stats for Insert()Stefan Majewsky2026-04-241-0/+1
|
* add Store.Upsert()Stefan Majewsky2026-04-241-2/+90
|
* remove support for SQL dialects that rely on LastInsertId()Stefan Majewsky2026-04-241-80/+11
| | | | | | | | | | While researching for Upsert(), I noticed that both SQLite and MariaDB support INSERT with RETURNING clause, which is objectively better than LastInsertId() and cuts out a lot of useless crap from the codebase (esp. from monomorphization-relevant methods). The only tangible downside is that this drops support specifically for MySQL, but you know what? Fuck Oracle.
* change Store.Insert() to take arguments by pointerStefan Majewsky2026-04-191-12/+11
| | | | | | | | This increases memory overhead slightly, but when converting Gorp uses into Oblast, I saw that there is a legitimate risk of just ignoring the result value and continuing with the unupdated records. So according to the design priorities that I myself laid down, I'm sacrificing some performance for safety of use.
* fix Store.Insert() failing on tables without auto columnsStefan Majewsky2026-04-181-15/+23
|
* more test coverage, forbid non-zero auto columns during Insert()Stefan Majewsky2026-04-181-3/+15
|
* minimize function bodies for generic Insert function(s)Stefan Majewsky2026-04-171-37/+78
|
* remove more instances of defer()Stefan Majewsky2026-04-171-2/+2
|
* reduce function body size for Update(), Delete()Stefan Majewsky2026-04-171-49/+54
|
* add type preparedStatement to simplify write opsStefan Majewsky2026-04-171-60/+65
|
* basic test coverage for Insert, Update, DeleteStefan Majewsky2026-04-171-2/+7
|
* improve test coverage, error reporting for Select()Stefan Majewsky2026-04-171-3/+3
|
* add Store.Update()Stefan Majewsky2026-04-161-1/+53
|
* add PrepareThreshold tuning parameterStefan Majewsky2026-04-161-15/+49
|
* take non-pointer records on Insert()Stefan Majewsky2026-04-161-10/+11
|
* add initial sketches for Store.Insert, Store.UpdateStefan Majewsky2026-04-121-0/+120
| | | | Currently extremely bad performance for some reason. Need to investigate.
* add Store.SelectOneStefan Majewsky2026-04-121-92/+0
|
* add Handle interfaceStefan Majewsky2026-04-121-3/+2
|
* reorganize the API from type DB to type StoreStefan Majewsky2026-04-111-11/+8
|
* reduce function body of Select() further, add context to errorsStefan Majewsky2026-04-111-14/+32
|
* reduce function body of Select()Stefan Majewsky2026-04-111-16/+37
|
* say no to ctxStefan Majewsky2026-04-111-2/+1
|
* move Select() to separate fileStefan Majewsky2026-04-101-0/+58