Updates
This commit is contained in:
Vendored
+39
-39
@@ -1,32 +1,32 @@
|
||||
import type { RequestOptions } from "https";
|
||||
export type BUN_SQLITE_DatabaseFullName = string;
|
||||
export type NSQLITE_DatabaseFullName = string;
|
||||
export declare const UsersOmitedFields: readonly ["password", "social_id", "verification_status", "date_created", "date_created_code", "date_created_timestamp", "date_updated", "date_updated_code", "date_updated_timestamp"];
|
||||
export interface BUN_SQLITE_DatabaseSchemaType {
|
||||
export interface NSQLITE_DatabaseSchemaType {
|
||||
id?: string | number;
|
||||
dbName?: string;
|
||||
dbSlug?: string;
|
||||
dbFullName?: string;
|
||||
dbDescription?: string;
|
||||
dbImage?: string;
|
||||
tables: BUN_SQLITE_TableSchemaType[];
|
||||
childrenDatabases?: BUN_SQLITE_ChildrenDatabaseObject[];
|
||||
tables: NSQLITE_TableSchemaType[];
|
||||
childrenDatabases?: NSQLITE_ChildrenDatabaseObject[];
|
||||
childDatabase?: boolean;
|
||||
childDatabaseDbId?: string | number;
|
||||
updateData?: boolean;
|
||||
collation?: (typeof MariaDBCollations)[number];
|
||||
}
|
||||
export interface BUN_SQLITE_ChildrenDatabaseObject {
|
||||
export interface NSQLITE_ChildrenDatabaseObject {
|
||||
dbId?: string | number;
|
||||
}
|
||||
export declare const MariaDBCollations: readonly ["utf8mb4_bin", "utf8mb4_unicode_520_ci"];
|
||||
export interface BUN_SQLITE_TableSchemaType {
|
||||
export interface NSQLITE_TableSchemaType {
|
||||
id?: string | number;
|
||||
tableName: string;
|
||||
tableDescription?: string;
|
||||
fields: BUN_SQLITE_FieldSchemaType[];
|
||||
indexes?: BUN_SQLITE_IndexSchemaType[];
|
||||
uniqueConstraints?: BUN_SQLITE_UniqueConstraintSchemaType[];
|
||||
childrenTables?: BUN_SQLITE_ChildrenTablesType[];
|
||||
fields: NSQLITE_FieldSchemaType[];
|
||||
indexes?: NSQLITE_IndexSchemaType[];
|
||||
uniqueConstraints?: NSQLITE_UniqueConstraintSchemaType[];
|
||||
childrenTables?: NSQLITE_ChildrenTablesType[];
|
||||
/**
|
||||
* Whether this is a child table
|
||||
*/
|
||||
@@ -61,7 +61,7 @@ export interface BUN_SQLITE_TableSchemaType {
|
||||
isVector?: boolean;
|
||||
vectorType?: string;
|
||||
}
|
||||
export interface BUN_SQLITE_ChildrenTablesType {
|
||||
export interface NSQLITE_ChildrenTablesType {
|
||||
tableId?: string | number;
|
||||
dbId?: string | number;
|
||||
}
|
||||
@@ -96,18 +96,18 @@ export declare const TextFieldTypesArray: readonly [{
|
||||
readonly title: "Code";
|
||||
readonly value: "code";
|
||||
}];
|
||||
export declare const BUN_SQLITE_DATATYPES: readonly [{
|
||||
export declare const NSQLITE_DATATYPES: readonly [{
|
||||
readonly value: "TEXT";
|
||||
}, {
|
||||
readonly value: "INTEGER";
|
||||
}];
|
||||
export type BUN_SQLITE_FieldSchemaType = {
|
||||
export type NSQLITE_FieldSchemaType = {
|
||||
id?: number | string;
|
||||
fieldName?: string;
|
||||
fieldDescription?: string;
|
||||
originName?: string;
|
||||
updatedField?: boolean;
|
||||
dataType: (typeof BUN_SQLITE_DATATYPES)[number]["value"];
|
||||
dataType: (typeof NSQLITE_DATATYPES)[number]["value"];
|
||||
nullValue?: boolean;
|
||||
notNullValue?: boolean;
|
||||
primaryKey?: boolean;
|
||||
@@ -115,7 +115,7 @@ export type BUN_SQLITE_FieldSchemaType = {
|
||||
autoIncrement?: boolean;
|
||||
defaultValue?: string | number;
|
||||
defaultValueLiteral?: string;
|
||||
foreignKey?: BUN_SQLITE_ForeignKeyType;
|
||||
foreignKey?: NSQLITE_ForeignKeyType;
|
||||
defaultField?: boolean;
|
||||
plainText?: boolean;
|
||||
unique?: boolean;
|
||||
@@ -156,7 +156,7 @@ CREATE VIRTUAL TABLE documents USING vec0(
|
||||
|
||||
-- INSERTING (Notice: No '+' here)
|
||||
INSERT INTO documents(embedding, title, raw_body)
|
||||
VALUES (vec_f32(?), 'Bun Docs', 'Bun is a fast JavaScript runtime...');
|
||||
VALUES (vec_f32(?), 'Node Docs', 'Node is a fast JavaScript runtime...');
|
||||
|
||||
-- QUERYING (Notice: No '+' here)
|
||||
SELECT title, raw_body
|
||||
@@ -168,7 +168,7 @@ WHERE embedding MATCH ? AND k = 1;
|
||||
} & {
|
||||
[key in (typeof TextFieldTypesArray)[number]["value"]]?: boolean;
|
||||
};
|
||||
export interface BUN_SQLITE_ForeignKeyType {
|
||||
export interface NSQLITE_ForeignKeyType {
|
||||
foreignKeyName?: string;
|
||||
destinationTableName?: string;
|
||||
destinationTableColumnName?: string;
|
||||
@@ -176,28 +176,28 @@ export interface BUN_SQLITE_ForeignKeyType {
|
||||
cascadeDelete?: boolean;
|
||||
cascadeUpdate?: boolean;
|
||||
}
|
||||
export interface BUN_SQLITE_IndexSchemaType {
|
||||
export interface NSQLITE_IndexSchemaType {
|
||||
id?: string | number;
|
||||
indexName?: string;
|
||||
indexType?: (typeof IndexTypes)[number];
|
||||
indexTableFields?: BUN_SQLITE_IndexTableFieldType[];
|
||||
indexTableFields?: NSQLITE_IndexTableFieldType[];
|
||||
alias?: string;
|
||||
newTempIndex?: boolean;
|
||||
}
|
||||
export interface BUN_SQLITE_UniqueConstraintSchemaType {
|
||||
export interface NSQLITE_UniqueConstraintSchemaType {
|
||||
id?: string | number;
|
||||
constraintName?: string;
|
||||
alias?: string;
|
||||
constraintTableFields?: BUN_SQLITE_UniqueConstraintFieldType[];
|
||||
constraintTableFields?: NSQLITE_UniqueConstraintFieldType[];
|
||||
}
|
||||
export interface BUN_SQLITE_UniqueConstraintFieldType {
|
||||
export interface NSQLITE_UniqueConstraintFieldType {
|
||||
value: string;
|
||||
}
|
||||
export interface BUN_SQLITE_IndexTableFieldType {
|
||||
export interface NSQLITE_IndexTableFieldType {
|
||||
value: string;
|
||||
dataType: string;
|
||||
}
|
||||
export interface BUN_SQLITE_MYSQL_SHOW_INDEXES_Type {
|
||||
export interface NSQLITE_MYSQL_SHOW_INDEXES_Type {
|
||||
Key_name: string;
|
||||
Table: string;
|
||||
Column_name: string;
|
||||
@@ -207,7 +207,7 @@ export interface BUN_SQLITE_MYSQL_SHOW_INDEXES_Type {
|
||||
Index_comment: string;
|
||||
Comment: string;
|
||||
}
|
||||
export interface BUN_SQLITE_MYSQL_SHOW_COLUMNS_Type {
|
||||
export interface NSQLITE_MYSQL_SHOW_COLUMNS_Type {
|
||||
Field: string;
|
||||
Type: string;
|
||||
Null: string;
|
||||
@@ -215,7 +215,7 @@ export interface BUN_SQLITE_MYSQL_SHOW_COLUMNS_Type {
|
||||
Default: string;
|
||||
Extra: string;
|
||||
}
|
||||
export interface BUN_SQLITE_MARIADB_SHOW_INDEXES_TYPE {
|
||||
export interface NSQLITE_MARIADB_SHOW_INDEXES_TYPE {
|
||||
Table: string;
|
||||
Non_unique: 0 | 1;
|
||||
Key_name: string;
|
||||
@@ -230,12 +230,12 @@ export interface BUN_SQLITE_MARIADB_SHOW_INDEXES_TYPE {
|
||||
Index_comment?: string;
|
||||
Ignored?: "YES" | "NO";
|
||||
}
|
||||
export interface BUN_SQLITE_MYSQL_FOREIGN_KEYS_Type {
|
||||
export interface NSQLITE_MYSQL_FOREIGN_KEYS_Type {
|
||||
CONSTRAINT_NAME: string;
|
||||
CONSTRAINT_SCHEMA: string;
|
||||
TABLE_NAME: string;
|
||||
}
|
||||
export interface BUN_SQLITE_MYSQL_user_databases_Type {
|
||||
export interface NSQLITE_MYSQL_user_databases_Type {
|
||||
id: number;
|
||||
user_id: number;
|
||||
db_full_name: string;
|
||||
@@ -362,7 +362,7 @@ export interface GetReturn<R extends any = any> {
|
||||
payload?: R;
|
||||
msg?: string;
|
||||
error?: string;
|
||||
schema?: BUN_SQLITE_TableSchemaType;
|
||||
schema?: NSQLITE_TableSchemaType;
|
||||
finalQuery?: string;
|
||||
}
|
||||
export interface GetSchemaRequestQuery {
|
||||
@@ -383,7 +383,7 @@ export interface PostReturn {
|
||||
payload?: Object[] | string | PostInsertReturn;
|
||||
msg?: string;
|
||||
error?: any;
|
||||
schema?: BUN_SQLITE_TableSchemaType;
|
||||
schema?: NSQLITE_TableSchemaType;
|
||||
}
|
||||
export interface PostDataPayload {
|
||||
action: "insert" | "update" | "delete";
|
||||
@@ -615,8 +615,8 @@ export type ServerQueryParamsJoinMatchSourceTargetObject = {
|
||||
export type ApiConnectBody = {
|
||||
url: string;
|
||||
key: string;
|
||||
database: BUN_SQLITE_MYSQL_user_databases_Type;
|
||||
dbSchema: BUN_SQLITE_DatabaseSchemaType;
|
||||
database: NSQLITE_MYSQL_user_databases_Type;
|
||||
dbSchema: NSQLITE_DatabaseSchemaType;
|
||||
type: "pull" | "push";
|
||||
user_id?: string | number;
|
||||
};
|
||||
@@ -876,7 +876,7 @@ export type APIResponseObject<T extends {
|
||||
countQueryObject?: ResponseQueryObject;
|
||||
status?: number;
|
||||
count?: number;
|
||||
errors?: BUNSQLITEErrorObject[];
|
||||
errors?: NSQLITEErrorObject[];
|
||||
debug?: any;
|
||||
batchPayload?: any[][] | null;
|
||||
errorData?: any;
|
||||
@@ -965,7 +965,7 @@ export type DefaultEntryType = {
|
||||
[k: string]: string | number | null;
|
||||
};
|
||||
export declare const IndexTypes: readonly ["regular", "full_text", "vector"];
|
||||
export type BUNSQLITEErrorObject = {
|
||||
export type NSQLITEErrorObject = {
|
||||
sql?: string;
|
||||
sqlValues?: any[];
|
||||
error?: string;
|
||||
@@ -986,7 +986,7 @@ export type SQLInsertGenParams = {
|
||||
tableName: string;
|
||||
dbFullName?: string;
|
||||
};
|
||||
export type BunSQLiteConfig = {
|
||||
export type NSQLiteConfig = {
|
||||
db_name: string;
|
||||
/**
|
||||
* The Name of the Database Schema File. Eg `db_schema.ts`. This is
|
||||
@@ -1008,8 +1008,8 @@ export type BunSQLiteConfig = {
|
||||
*/
|
||||
typedef_file_path?: string;
|
||||
};
|
||||
export type BunSQLiteConfigReturn = {
|
||||
config: BunSQLiteConfig;
|
||||
dbSchema: BUN_SQLITE_DatabaseSchemaType;
|
||||
export type NSQLiteConfigReturn = {
|
||||
config: NSQLiteConfig;
|
||||
dbSchema: NSQLITE_DatabaseSchemaType;
|
||||
};
|
||||
export declare const DefaultFields: BUN_SQLITE_FieldSchemaType[];
|
||||
export declare const DefaultFields: NSQLITE_FieldSchemaType[];
|
||||
|
||||
Vendored
+2
-2
@@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.DefaultFields = exports.IndexTypes = exports.DockerComposeServices = exports.QueryFields = exports.DsqlCrudActions = exports.DataCrudRequestMethodsLowerCase = exports.DataCrudRequestMethods = exports.ServerQueryEqualities = exports.ServerQueryOperators = exports.BUN_SQLITE_DATATYPES = exports.TextFieldTypesArray = exports.MariaDBCollations = exports.UsersOmitedFields = void 0;
|
||||
exports.DefaultFields = exports.IndexTypes = exports.DockerComposeServices = exports.QueryFields = exports.DsqlCrudActions = exports.DataCrudRequestMethodsLowerCase = exports.DataCrudRequestMethods = exports.ServerQueryEqualities = exports.ServerQueryOperators = exports.NSQLITE_DATATYPES = exports.TextFieldTypesArray = exports.MariaDBCollations = exports.UsersOmitedFields = void 0;
|
||||
exports.UsersOmitedFields = [
|
||||
"password",
|
||||
"social_id",
|
||||
@@ -28,7 +28,7 @@ exports.TextFieldTypesArray = [
|
||||
{ title: "Shell", value: "shell" },
|
||||
{ title: "Code", value: "code" },
|
||||
];
|
||||
exports.BUN_SQLITE_DATATYPES = [
|
||||
exports.NSQLITE_DATATYPES = [
|
||||
{ value: "TEXT" },
|
||||
{ value: "INTEGER" },
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user