Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Spec Refactor: * Spec.build method is removed. Specs are now fully declarative and the DbType is responsible for implementation. * Add Spec.prefix method * Change Spec.seek nullOrder, Spec.orderBy direction and nullOrder to be database Default * Tests are improved and now shared between database specs insteads of duplicated. The increased coverage exposed some tangential issues which are also resolved in this MR (see below). Note: switched from munit assertEquals -> assert until fix for scalameta/munit#855 (comment) is released. Additional changes: * No longer need to handle null when using DbCodec.biMap, or implementing DbCodec.readSingle * When implementing DbCodec, new method readSingleOption must be defined * Support optional products in outer-join queries (see test OptionalProductTests) * Switched to latest scalafmt version to prevent OOM in OracleTests * Make Frag, Query, Update, Returning into regular classes * Frag.returningKeys method which uses ResultSet.getGeneratedKeys * Make MySq insertReturning throw, since we shouldn't define 2-query repository methods. * reduce duplication with shared DbCodec.readSingleOpt impl * remove unused def in MySqlDbType * fix SqlLogger error formatting * use keyColumsArr in Returning * make sure no expr duplication in sql macro * add test to ensure that embedded frag param exprs are evaluated only once
- Loading branch information