mirror of
https://github.com/trailbaseio/trailbase.git
synced 2026-02-21 10:19:02 -06:00
Move rust client to /client/rust.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
exclude: '(trailbase-core/bindings|bindings)/.*'
|
||||
exclude: '(trailbase-assets/js/bindings|trailbase-schema/bindings|vendor)/.*'
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = [
|
||||
"client/trailbase-rs",
|
||||
"client/rust",
|
||||
"docs/examples/record_api_rs",
|
||||
"examples/custom-binary",
|
||||
"trailbase-apalis",
|
||||
@@ -18,7 +18,7 @@ members = [
|
||||
"vendor/sqlean",
|
||||
]
|
||||
default-members = [
|
||||
"client/trailbase-rs",
|
||||
"client/rust",
|
||||
"trailbase-assets",
|
||||
"trailbase-build",
|
||||
"trailbase-cli",
|
||||
@@ -67,8 +67,9 @@ tokio = { version = "^1.38.0", features = ["macros", "rt-multi-thread", "fs", "s
|
||||
tracing = { version = "0.1.40", default-features = false }
|
||||
tracing-subscriber = { version = "0.3.18", default-features = false, features = ["smallvec", "std", "fmt", "json"] }
|
||||
trailbase-apalis = { path = "trailbase-apalis", version = "0.1.0" }
|
||||
trailbase-build = { path = "trailbase-build", version = "0.1.1" }
|
||||
trailbase-assets = { path = "trailbase-assets", version = "0.2.0" }
|
||||
trailbase-build = { path = "trailbase-build", version = "0.1.1" }
|
||||
trailbase-client = { path = "client/rust", version = "0.5.0" }
|
||||
trailbase-sqlean = { path = "vendor/sqlean", version = "0.0.3" }
|
||||
trailbase-extension = { path = "trailbase-extension", version = "0.3.0" }
|
||||
trailbase-js = { path = "trailbase-js", version = "0.2.0" }
|
||||
|
||||
@@ -19,7 +19,7 @@ const PORT: u16 = 4057;
|
||||
|
||||
fn start_server() -> Result<Server, std::io::Error> {
|
||||
let cwd = std::env::current_dir()?;
|
||||
assert!(cwd.ends_with("trailbase-rs"));
|
||||
assert!(cwd.ends_with("rust"));
|
||||
|
||||
let command_cwd = cwd.parent().unwrap().parent().unwrap();
|
||||
let depot_path = "client/testfixture";
|
||||
@@ -9,4 +9,4 @@ anyhow = "1.0.95"
|
||||
futures = "0.3.31"
|
||||
serde_json = "1.0.137"
|
||||
tokio = { workspace = true }
|
||||
trailbase-client = { path = "../../../client/trailbase-rs/" }
|
||||
trailbase-client = { workspace = true }
|
||||
|
||||
1
trailbase-schema/.gitignore
vendored
Normal file
1
trailbase-schema/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bindings/
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type Check = { name: string | null, expr: string, };
|
||||
@@ -1,5 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ColumnDataType } from "./ColumnDataType";
|
||||
import type { ColumnOption } from "./ColumnOption";
|
||||
|
||||
export type Column = { name: string, data_type: ColumnDataType, options: Array<ColumnOption>, };
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ColumnDataType = "Null" | "Any" | "Blob" | "Text" | "Integer" | "Real" | "Numeric" | "JSON" | "JSONB" | "Int" | "TinyInt" | "SmallInt" | "MediumInt" | "BigInt" | "UnignedBigInt" | "Int2" | "Int4" | "Int8" | "Character" | "Varchar" | "VaryingCharacter" | "NChar" | "NativeCharacter" | "NVarChar" | "Clob" | "Double" | "DoublePrecision" | "Float" | "Boolean" | "Decimal" | "Date" | "DateTime";
|
||||
@@ -1,6 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ConflictResolution } from "./ConflictResolution";
|
||||
import type { GeneratedExpressionMode } from "./GeneratedExpressionMode";
|
||||
import type { ReferentialAction } from "./ReferentialAction";
|
||||
|
||||
export type ColumnOption = "Null" | "NotNull" | { "Default": string } | { "Unique": { is_primary: boolean, conflict_clause: ConflictResolution | null, } } | { "ForeignKey": { foreign_table: string, referred_columns: Array<string>, on_delete: ReferentialAction | null, on_update: ReferentialAction | null, } } | { "Check": string } | { "OnUpdate": string } | { "Generated": { expr: string, mode: GeneratedExpressionMode | null, } };
|
||||
@@ -1,6 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Conflict resolution types
|
||||
*/
|
||||
export type ConflictResolution = "Rollback" | "Abort" | "Fail" | "Ignore" | "Replace";
|
||||
@@ -1,4 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ReferentialAction } from "./ReferentialAction";
|
||||
|
||||
export type ForeignKey = { name: string | null, columns: Array<string>, foreign_table: string, referred_columns: Array<string>, on_delete: ReferentialAction | null, on_update: ReferentialAction | null, };
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type GeneratedExpressionMode = "Virtual" | "Stored";
|
||||
@@ -1,3 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type ReferentialAction = "Restrict" | "Cascade" | "SetNull" | "NoAction" | "SetDefault";
|
||||
@@ -1,7 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Check } from "./Check";
|
||||
import type { Column } from "./Column";
|
||||
import type { ForeignKey } from "./ForeignKey";
|
||||
import type { UniqueConstraint } from "./UniqueConstraint";
|
||||
|
||||
export type Table = { name: string, strict: boolean, columns: Array<Column>, foreign_keys: Array<ForeignKey>, unique: Array<UniqueConstraint>, checks: Array<Check>, virtual_table: boolean, temporary: boolean, };
|
||||
@@ -1,11 +0,0 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ConflictResolution } from "./ConflictResolution";
|
||||
|
||||
export type UniqueConstraint = { name: string | null,
|
||||
/**
|
||||
* Identifiers of the columns that are unique.
|
||||
*
|
||||
* TODO: Should be indexed/ordered column, e.g. ASC/DESC:
|
||||
* https://www.sqlite.org/syntax/indexed-column.html
|
||||
*/
|
||||
columns: Array<string>, conflict_clause: ConflictResolution | null, };
|
||||
Reference in New Issue
Block a user