ouais
This commit is contained in:
parent
626e465d8c
commit
234a6ebb4b
5 changed files with 745 additions and 3110 deletions
2
.cargo/toml
Normal file
2
.cargo/toml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[registries.crates-io]
|
||||||
|
protocol = "sparse"
|
|
@ -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?
|
|
|
@ -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,
|
## Primitives
|
||||||
corresponding to what is allowed in each field.
|
|
||||||
|
|
||||||
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
|
- DateTimeTz
|
||||||
with no precision indicator. It's suggested that only numbers that fit in
|
- Timezone-aware date (internally stored as ISO8601)
|
||||||
64-bit IEEE-754 floating point numbers be stored in here for now, but as the
|
- There is no non-timezone-aware date. Please use a string type for that
|
||||||
database spec gets revised this may be further split into integers and
|
- Unit
|
||||||
non-integers.
|
- 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?
|
||||||
|
|
15
flake.nix
15
flake.nix
|
@ -12,6 +12,7 @@
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [
|
overlays = [
|
||||||
fenix.overlays.default
|
fenix.overlays.default
|
||||||
|
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
prisma-engines = prisma-engines.packages.${system}.prisma-engines;
|
prisma-engines = prisma-engines.packages.${system}.prisma-engines;
|
||||||
})
|
})
|
||||||
|
@ -25,16 +26,13 @@
|
||||||
|
|
||||||
toolchain = with fenix.packages.${system};
|
toolchain = with fenix.packages.${system};
|
||||||
combine [
|
combine [
|
||||||
minimal.rustc
|
stable.rustc
|
||||||
minimal.cargo
|
stable.cargo
|
||||||
targets.wasm32-unknown-unknown.latest.rust-std
|
# targets.wasm32-unknown-unknown.latest.rust-std
|
||||||
];
|
];
|
||||||
|
|
||||||
dioxus-cli = pkgs.callPackage ./nix/dioxus-cli.nix { };
|
|
||||||
|
|
||||||
flakePkgs = rec {
|
flakePkgs = rec {
|
||||||
mdbook-tera =
|
# mdbook-tera = pkgs.callPackage ./nix/mdbook-tera.nix { inherit toolchain; };
|
||||||
pkgs.callPackage ./nix/mdbook-tera.nix { inherit toolchain; };
|
|
||||||
};
|
};
|
||||||
in rec {
|
in rec {
|
||||||
packages = flake-utils.lib.flattenTree flakePkgs;
|
packages = flake-utils.lib.flattenTree flakePkgs;
|
||||||
|
@ -51,7 +49,6 @@
|
||||||
|
|
||||||
zlib
|
zlib
|
||||||
|
|
||||||
dioxus-cli
|
|
||||||
cargo-generate
|
cargo-generate
|
||||||
pkg-config
|
pkg-config
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
|
@ -61,7 +58,7 @@
|
||||||
yq
|
yq
|
||||||
|
|
||||||
mdbook
|
mdbook
|
||||||
flakePkgs.mdbook-tera
|
# flakePkgs.mdbook-tera
|
||||||
|
|
||||||
(python310.withPackages
|
(python310.withPackages
|
||||||
(p: with p; [ ipython numpy scipy sympy ]))
|
(p: with p; [ ipython numpy scipy sympy ]))
|
||||||
|
|
3738
package-lock.json
generated
3738
package-lock.json
generated
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue