Jonathan Bernard c6430baa9a Support more ID types, allow creating records with known IDs.
* Previously all ID types needed to have the `isZero` function defined.
  This was named after the UUID.isZero function but does not describe
  the general case. Non-numeric is types will not be "zero," they will
  be "empty." Renamed to `isEmpty` and implemented basic versions of
  this for `int`, `string`, and `UUID`.

* Previously newly created records were not allowed to have ids set.
  Fiber required them to be set in the database and the caller to
  retrieve the newly generated ID from the newly created record. This is
  not really a decision that Fiber should make in a general case. There
  are valid reasons for both possibilities (creating the id in the
  application code vs. creating the id in the database layer). As a
  more general-purpose solution Fiber now leaves this to the caller.

  If the caller provides an id value, Fiber will include it in the
  INSERT statement. If the id is unset, Fiber will not include it at
  all, allowing it to be generated in the database.
2020-01-02 18:55:46 -06:00
2019-12-25 18:07:23 -06:00
2019-12-25 20:36:03 -06:00
Description
No description provided
207 KiB
Languages
Nim 99.3%
Makefile 0.7%