This commit is contained in:
Michael Zhang 2023-06-13 13:48:28 -05:00
parent 626e465d8c
commit 234a6ebb4b
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B
5 changed files with 745 additions and 3110 deletions

2
.cargo/toml Normal file
View file

@ -0,0 +1,2 @@
[registries.crates-io]
protocol = "sparse"

View file

@ -1,42 +0,0 @@
# Data types
close to javascript types? i guess
## Primitives
- number
- Arbitrary precision number
- End with \_u8, \_u32, \_u64 or \_f- or \_i-equivalents to _suggest_ a
particular container size
- boolean
- literally true or false
- string
## Special primitives
- DateTimeTz
- Timezone-aware date (internally stored as ISO8601)
- There is no non-timezone-aware date. Please use a string type for that
## Type constructors
- Option
- Either
- Heterogeneous list
- Heterogeneous map
- Array
- Record
- Enum
## Complex type constructors
- JSON schema
# Interfaces
Interfaces approximately match traits in rust, comprised of
- Associated types
- Functions
TODO: Generics?

View file

@ -1,24 +1,52 @@
# Types
# Data types
The panorama database is strongly typed.
close to javascript types? i guess
In the database, each metadata key has a corresponding `type` expression,
corresponding to what is allowed in each field.
## Primitives
TODO: How to handle types from different versions of a package? Semver?
- number
- Arbitrary precision number
- End with \_u8, \_u32, \_u64 or \_f- or \_i-equivalents to _suggest_ a
particular container size
- boolean
- literally true or false
- string
## Basic Types
## Special primitives
- `number`: As a database value, this is stored as an arbitrary-valued number
with no precision indicator. It's suggested that only numbers that fit in
64-bit IEEE-754 floating point numbers be stored in here for now, but as the
database spec gets revised this may be further split into integers and
non-integers.
- DateTimeTz
- Timezone-aware date (internally stored as ISO8601)
- There is no non-timezone-aware date. Please use a string type for that
- Unit
- This is essentially a number with an attached unit specifier (string)
- Each unit _type_ is distinct, and allows a number of units that can freely
convert within it. For example:
- Time (ms, sec, min, hr, day, week, etc.)
- File size (byte, kb, mb, mib, gib, etc.)
- Temperature (c, f, k)
- Distance (ft, mi, m, km, etc.)
- Currency is **NOT** considered a unit and has no semantic meaning within the
database.
- `boolean`: This is either true or false.
## Type constructors
- `string`: UTF-8
- Option
- Either
- Heterogeneous list
- Heterogeneous map
- Array
- Record
- Enum
- `bytes`: Binary blobs.
## Complex type constructors
## Type Constructors
- JSON schema
# Interfaces
Interfaces approximately match traits in rust, comprised of
- Associated types
- Functions
TODO: Generics?

View file

@ -12,6 +12,7 @@
inherit system;
overlays = [
fenix.overlays.default
(final: prev: {
prisma-engines = prisma-engines.packages.${system}.prisma-engines;
})
@ -25,16 +26,13 @@
toolchain = with fenix.packages.${system};
combine [
minimal.rustc
minimal.cargo
targets.wasm32-unknown-unknown.latest.rust-std
stable.rustc
stable.cargo
# targets.wasm32-unknown-unknown.latest.rust-std
];
dioxus-cli = pkgs.callPackage ./nix/dioxus-cli.nix { };
flakePkgs = rec {
mdbook-tera =
pkgs.callPackage ./nix/mdbook-tera.nix { inherit toolchain; };
# mdbook-tera = pkgs.callPackage ./nix/mdbook-tera.nix { inherit toolchain; };
};
in rec {
packages = flake-utils.lib.flattenTree flakePkgs;
@ -51,7 +49,6 @@
zlib
dioxus-cli
cargo-generate
pkg-config
rust-analyzer
@ -61,7 +58,7 @@
yq
mdbook
flakePkgs.mdbook-tera
# flakePkgs.mdbook-tera
(python310.withPackages
(p: with p; [ ipython numpy scipy sympy ]))

3738
package-lock.json generated

File diff suppressed because it is too large Load diff