|
| 1 | +This is a checklist of steps needed to add a new type to EdgeDB, along with links to examples of PRs doing the tasks. |
| 2 | + |
| 3 | +Core database range PRs: |
| 4 | + * https://github.com/edgedb/edgedb/pull/3983 |
| 5 | + * https://github.com/edgedb/edgedb/pull/4020 |
| 6 | + |
| 7 | +Core database cal::duration PRs: |
| 8 | + * https://github.com/edgedb/edgedb/pull/3948 |
| 9 | + |
| 10 | +- [ ] JSON handling |
| 11 | + - [ ] Implement JSON casts if the default Postgres behavior won't work |
| 12 | + - [ ] Update output.serialize_expr_to_json(), if the default won't work |
| 13 | + * range: https://github.com/edgedb/edgedb/pull/4008 |
| 14 | + |
| 15 | +- [ ] If any new functions or constructors have an implementation that is not |
| 16 | + just purely a call to a strict function, make sure to test with inputs |
| 17 | + that are NULL at runtime! |
| 18 | + Probably the easiest way to generate NULL-at-runtime values is |
| 19 | + `<optional TYPE>$0` and then passing in `{}`. |
| 20 | + * range test example and bugfix: https://github.com/edgedb/edgedb/pull/4207/ |
| 21 | + |
| 22 | +- [ ] For compound types, add a schema class in edb/schema/types.py and |
| 23 | + |
| 24 | +- [ ] Add mapping to pgsql types in edb/pgsql/types.py |
| 25 | + |
| 26 | +- [ ] Add implementations of any relevant functions/operations to `edb/lib`. |
| 27 | + |
| 28 | +- [ ] For compound types, add a type descriptor and code for encoding it in |
| 29 | +edb/server/compiler/sertypes.py. |
| 30 | + * range: https://github.com/edgedb/edgedb/pull/4016 |
| 31 | + |
| 32 | +- [ ] For new scalar types, add it to edb/api/types.txt and edb/graphql/types.py. Run `edb gen-types`. |
| 33 | + |
| 34 | +- [ ] Update all of the first-party language drivers (or get their owners to) |
| 35 | + - [ ] Python (Fantix/Elvis/Sully) |
| 36 | + * cal::date_duration: https://github.com/edgedb/edgedb-python/pull/335 |
| 37 | + * range: https://github.com/edgedb/edgedb-python/pull/332/ |
| 38 | + - [ ] Go (Frederick) |
| 39 | + * cal::date_duration: https://github.com/edgedb/edgedb-go/pull/232 |
| 40 | + - [ ] Javascript (James/Colin) |
| 41 | + * cal::date_duration: https://github.com/edgedb/edgedb-js/pull/373/ |
| 42 | + * range: https://github.com/edgedb/edgedb-js/pull/377 |
| 43 | + - [ ] Rust/CLI (Paul) |
| 44 | + * This requires updating both the Rust bindings to support the |
| 45 | + new type and the CLI to properly print it |
| 46 | + * cal::date_duration: https://github.com/edgedb/edgedb-rust/pull/146, https://github.com/edgedb/edgedb-cli/pull/759 |
| 47 | + * range: https://github.com/edgedb/edgedb-rust/pull/145, https://github.com/edgedb/edgedb-cli/pull/755 |
| 48 | + |
| 49 | +- [ ] Add a field of the new type to the `dump` test for the new version |
| 50 | + |
| 51 | +- [ ] Write tests. |
0 commit comments