hysteria-orm 10.3.6 → 10.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
+ import * as mongodb from 'mongodb';
2
+ import { Collection as Collection$1 } from 'mongodb';
1
3
  import { PoolAttributes, Pool, Connection, Result } from 'oracledb';
2
4
  import * as mssql from 'mssql';
3
5
  import { config, Transaction as Transaction$1, IResult } from 'mssql';
4
- import * as mongodb from 'mongodb';
5
- import { Collection as Collection$1 } from 'mongodb';
6
6
  import * as sqlite3 from 'sqlite3';
7
7
  import { RunResult } from 'sqlite3';
8
8
  import * as pg from 'pg';
@@ -113,6 +113,10 @@ interface NotNullableMysqlSqlDataSourceInput extends MysqlSqlDataSourceInput {
113
113
  }
114
114
  interface SqliteDataSourceInput extends CommonDataSourceInput {
115
115
  readonly type?: "sqlite";
116
+ /**
117
+ * @description The filename of the database file for SQLite
118
+ * @default ":memory:"
119
+ */
116
120
  readonly database?: string;
117
121
  }
118
122
  interface NotNullableSqliteDataSourceInput extends SqliteDataSourceInput {
@@ -759,6 +763,7 @@ type ForeignKeyOptions = CommonConstraintOptions & {
759
763
  onUpdate?: OnUpdateOrDelete;
760
764
  };
761
765
  type CreateTableContext = "alter_table" | "create_table";
766
+ type CommonPostgresExtensions = "postgis" | "uuid-ossp" | "hstore" | "pg_trgm" | "btree_gin" | "btree_gist" | "citext" | "pgcrypto" | "tablefunc" | "unaccent" | "pg_stat_statements" | "ltree" | "cube" | "earthdistance" | "fuzzystrmatch" | "intarray" | "isn" | "lo" | "pg_buffercache" | "pgrowlocks" | "pgstattuple" | "pg_freespacemap" | "postgres_fdw" | "seg" | "tsm_system_rows" | "tsm_system_time" | "plpgsql" | "plperl" | "plpython3u" | "pltcl" | "adminpack" | "amcheck" | "autoinc" | "bloom" | "dict_int" | "dict_xsyn" | "file_fdw" | "insert_username" | "intagg" | "moddatetime" | "old_snapshot" | "pageinspect" | "pg_prewarm" | "pg_surgery" | "pg_visibility" | "pgaudit" | "pglogical" | "pgrouting" | "postgis_topology" | "postgis_raster" | "postgis_sfcgal" | "postgis_tiger_geocoder" | "address_standardizer" | "address_standardizer_data_us" | "refint" | "sslinfo" | "tcn" | "timescaledb" | "vector" | "xml2";
762
767
 
763
768
  /**
764
769
  * @description AdminJS plugin types - All AdminJS imports are done at runtime via dynamic import()
@@ -1126,6 +1131,11 @@ type MigrationConfigBase = {
1126
1131
  * @default true
1127
1132
  */
1128
1133
  lock?: boolean;
1134
+ /**
1135
+ * @description Lock timeout in milliseconds for migration advisory lock acquisition, can be overridden in the cli command
1136
+ * @default 30000
1137
+ */
1138
+ lockTimeout?: number;
1129
1139
  };
1130
1140
  /**
1131
1141
  * @description Migration configuration with transactional support for PostgreSQL and CockroachDB
@@ -1592,7 +1602,7 @@ declare class CreateTableBuilder extends BaseBuilder {
1592
1602
  constructor(sqlType: SqlDataSourceType, nodes: QueryNode[], tableName?: string, context?: "alter_table" | "create_table");
1593
1603
  private build;
1594
1604
  /**
1595
- * @description Adds a raw statement to an operation that will be executed as is
1605
+ * @description Adds a raw statement to define a default value as is
1596
1606
  * @example
1597
1607
  * ```ts
1598
1608
  * table.varchar("name").default(table.rawStatement("CURRENT_TIMESTAMP"));
@@ -1873,6 +1883,41 @@ declare class CreateTableBuilder extends BaseBuilder {
1873
1883
  * ```
1874
1884
  */
1875
1885
  rawColumn(raw: string): ConstraintBuilder;
1886
+ /**
1887
+ * Geometry data type
1888
+ * @mysql GEOMETRY
1889
+ * @postgres GEOMETRY (must have PostGIS extension)
1890
+ * @sqlite GEOMETRY must have SpatiaLite extension
1891
+ */
1892
+ geometry(name: string): ConstraintBuilder;
1893
+ /**
1894
+ * Point data type
1895
+ * @mysql POINT
1896
+ * @postgres POINT
1897
+ * @sqlite POINT must have SpatiaLite extension
1898
+ */
1899
+ point(name: string): ConstraintBuilder;
1900
+ /**
1901
+ * Linestring data type
1902
+ * @mysql LINESTRING
1903
+ * @postgres LINESTRING
1904
+ * @sqlite LINESTRING must have SpatiaLite extension
1905
+ */
1906
+ linestring(name: string): ConstraintBuilder;
1907
+ /**
1908
+ * Polygon data type
1909
+ * @mysql POLYGON
1910
+ * @postgres POLYGON
1911
+ * @sqlite POLYGON must have SpatiaLite extension
1912
+ */
1913
+ polygon(name: string): ConstraintBuilder;
1914
+ /**
1915
+ * MultiPoint data type
1916
+ * @mysql MULTIPOINT
1917
+ * @postgres MULTIPOINT
1918
+ * @sqlite MULTIPOINT must have SpatiaLite extension
1919
+ */
1920
+ multiPoint(name: string): ConstraintBuilder;
1876
1921
  getNamedConstraints(): QueryNode[];
1877
1922
  }
1878
1923
 
@@ -1881,7 +1926,7 @@ declare class AlterTableBuilder extends BaseBuilder {
1881
1926
  private sqlType;
1882
1927
  constructor(table: string, nodes: QueryNode[], sqlType: SqlDataSourceType);
1883
1928
  /**
1884
- * @description Adds a raw statement to an operation that will be executed as is
1929
+ * @description Adds a raw statement to define a default value as is
1885
1930
  * @example
1886
1931
  * ```ts
1887
1932
  * table.varchar("name").default(table.rawStatement("CURRENT_TIMESTAMP"));
@@ -1982,7 +2027,7 @@ declare class Schema {
1982
2027
  sqlType: SqlDataSourceType;
1983
2028
  constructor(sqlType?: SqlDataSourceType);
1984
2029
  /**
1985
- * @description Adds a raw statement to an operation that will be executed as is
2030
+ * @description Adds a raw statement to define a default value as is
1986
2031
  * @example
1987
2032
  * ```ts
1988
2033
  * schema.rawStatement("CURRENT_TIMESTAMP");
@@ -2065,6 +2110,16 @@ declare class Schema {
2065
2110
  * @description Drops a constraint from a table
2066
2111
  */
2067
2112
  dropConstraint(table: string, constraintName: string): void;
2113
+ /**
2114
+ * @description Create database extension, only supported for postgres
2115
+ * @postgres Supports extensions like PostGIS, uuid-ossp, hstore, etc.
2116
+ * @mysql Extensions are not supported - outputs a comment
2117
+ * @sqlite Extensions are loaded dynamically - outputs a comment
2118
+ * @mssql Extensions are not supported - outputs a comment
2119
+ * @oracledb Extensions are not supported - outputs a comment
2120
+ */
2121
+ createExtension(extensionName: CommonPostgresExtensions, ifNotExists?: boolean): void;
2122
+ createExtension(extensionName: string, ifNotExists?: boolean): void;
2068
2123
  private generateAstInstance;
2069
2124
  }
2070
2125
 
@@ -3780,6 +3835,7 @@ declare class SqlDataSource<D extends SqlDataSourceType = SqlDataSourceType, T e
3780
3835
  tsconfig?: string;
3781
3836
  lock: boolean;
3782
3837
  transactional: boolean;
3838
+ lockTimeout?: number;
3783
3839
  };
3784
3840
  /**
3785
3841
  * @description AdminJS configuration options
package/lib/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
+ import * as mongodb from 'mongodb';
2
+ import { Collection as Collection$1 } from 'mongodb';
1
3
  import { PoolAttributes, Pool, Connection, Result } from 'oracledb';
2
4
  import * as mssql from 'mssql';
3
5
  import { config, Transaction as Transaction$1, IResult } from 'mssql';
4
- import * as mongodb from 'mongodb';
5
- import { Collection as Collection$1 } from 'mongodb';
6
6
  import * as sqlite3 from 'sqlite3';
7
7
  import { RunResult } from 'sqlite3';
8
8
  import * as pg from 'pg';
@@ -113,6 +113,10 @@ interface NotNullableMysqlSqlDataSourceInput extends MysqlSqlDataSourceInput {
113
113
  }
114
114
  interface SqliteDataSourceInput extends CommonDataSourceInput {
115
115
  readonly type?: "sqlite";
116
+ /**
117
+ * @description The filename of the database file for SQLite
118
+ * @default ":memory:"
119
+ */
116
120
  readonly database?: string;
117
121
  }
118
122
  interface NotNullableSqliteDataSourceInput extends SqliteDataSourceInput {
@@ -759,6 +763,7 @@ type ForeignKeyOptions = CommonConstraintOptions & {
759
763
  onUpdate?: OnUpdateOrDelete;
760
764
  };
761
765
  type CreateTableContext = "alter_table" | "create_table";
766
+ type CommonPostgresExtensions = "postgis" | "uuid-ossp" | "hstore" | "pg_trgm" | "btree_gin" | "btree_gist" | "citext" | "pgcrypto" | "tablefunc" | "unaccent" | "pg_stat_statements" | "ltree" | "cube" | "earthdistance" | "fuzzystrmatch" | "intarray" | "isn" | "lo" | "pg_buffercache" | "pgrowlocks" | "pgstattuple" | "pg_freespacemap" | "postgres_fdw" | "seg" | "tsm_system_rows" | "tsm_system_time" | "plpgsql" | "plperl" | "plpython3u" | "pltcl" | "adminpack" | "amcheck" | "autoinc" | "bloom" | "dict_int" | "dict_xsyn" | "file_fdw" | "insert_username" | "intagg" | "moddatetime" | "old_snapshot" | "pageinspect" | "pg_prewarm" | "pg_surgery" | "pg_visibility" | "pgaudit" | "pglogical" | "pgrouting" | "postgis_topology" | "postgis_raster" | "postgis_sfcgal" | "postgis_tiger_geocoder" | "address_standardizer" | "address_standardizer_data_us" | "refint" | "sslinfo" | "tcn" | "timescaledb" | "vector" | "xml2";
762
767
 
763
768
  /**
764
769
  * @description AdminJS plugin types - All AdminJS imports are done at runtime via dynamic import()
@@ -1126,6 +1131,11 @@ type MigrationConfigBase = {
1126
1131
  * @default true
1127
1132
  */
1128
1133
  lock?: boolean;
1134
+ /**
1135
+ * @description Lock timeout in milliseconds for migration advisory lock acquisition, can be overridden in the cli command
1136
+ * @default 30000
1137
+ */
1138
+ lockTimeout?: number;
1129
1139
  };
1130
1140
  /**
1131
1141
  * @description Migration configuration with transactional support for PostgreSQL and CockroachDB
@@ -1592,7 +1602,7 @@ declare class CreateTableBuilder extends BaseBuilder {
1592
1602
  constructor(sqlType: SqlDataSourceType, nodes: QueryNode[], tableName?: string, context?: "alter_table" | "create_table");
1593
1603
  private build;
1594
1604
  /**
1595
- * @description Adds a raw statement to an operation that will be executed as is
1605
+ * @description Adds a raw statement to define a default value as is
1596
1606
  * @example
1597
1607
  * ```ts
1598
1608
  * table.varchar("name").default(table.rawStatement("CURRENT_TIMESTAMP"));
@@ -1873,6 +1883,41 @@ declare class CreateTableBuilder extends BaseBuilder {
1873
1883
  * ```
1874
1884
  */
1875
1885
  rawColumn(raw: string): ConstraintBuilder;
1886
+ /**
1887
+ * Geometry data type
1888
+ * @mysql GEOMETRY
1889
+ * @postgres GEOMETRY (must have PostGIS extension)
1890
+ * @sqlite GEOMETRY must have SpatiaLite extension
1891
+ */
1892
+ geometry(name: string): ConstraintBuilder;
1893
+ /**
1894
+ * Point data type
1895
+ * @mysql POINT
1896
+ * @postgres POINT
1897
+ * @sqlite POINT must have SpatiaLite extension
1898
+ */
1899
+ point(name: string): ConstraintBuilder;
1900
+ /**
1901
+ * Linestring data type
1902
+ * @mysql LINESTRING
1903
+ * @postgres LINESTRING
1904
+ * @sqlite LINESTRING must have SpatiaLite extension
1905
+ */
1906
+ linestring(name: string): ConstraintBuilder;
1907
+ /**
1908
+ * Polygon data type
1909
+ * @mysql POLYGON
1910
+ * @postgres POLYGON
1911
+ * @sqlite POLYGON must have SpatiaLite extension
1912
+ */
1913
+ polygon(name: string): ConstraintBuilder;
1914
+ /**
1915
+ * MultiPoint data type
1916
+ * @mysql MULTIPOINT
1917
+ * @postgres MULTIPOINT
1918
+ * @sqlite MULTIPOINT must have SpatiaLite extension
1919
+ */
1920
+ multiPoint(name: string): ConstraintBuilder;
1876
1921
  getNamedConstraints(): QueryNode[];
1877
1922
  }
1878
1923
 
@@ -1881,7 +1926,7 @@ declare class AlterTableBuilder extends BaseBuilder {
1881
1926
  private sqlType;
1882
1927
  constructor(table: string, nodes: QueryNode[], sqlType: SqlDataSourceType);
1883
1928
  /**
1884
- * @description Adds a raw statement to an operation that will be executed as is
1929
+ * @description Adds a raw statement to define a default value as is
1885
1930
  * @example
1886
1931
  * ```ts
1887
1932
  * table.varchar("name").default(table.rawStatement("CURRENT_TIMESTAMP"));
@@ -1982,7 +2027,7 @@ declare class Schema {
1982
2027
  sqlType: SqlDataSourceType;
1983
2028
  constructor(sqlType?: SqlDataSourceType);
1984
2029
  /**
1985
- * @description Adds a raw statement to an operation that will be executed as is
2030
+ * @description Adds a raw statement to define a default value as is
1986
2031
  * @example
1987
2032
  * ```ts
1988
2033
  * schema.rawStatement("CURRENT_TIMESTAMP");
@@ -2065,6 +2110,16 @@ declare class Schema {
2065
2110
  * @description Drops a constraint from a table
2066
2111
  */
2067
2112
  dropConstraint(table: string, constraintName: string): void;
2113
+ /**
2114
+ * @description Create database extension, only supported for postgres
2115
+ * @postgres Supports extensions like PostGIS, uuid-ossp, hstore, etc.
2116
+ * @mysql Extensions are not supported - outputs a comment
2117
+ * @sqlite Extensions are loaded dynamically - outputs a comment
2118
+ * @mssql Extensions are not supported - outputs a comment
2119
+ * @oracledb Extensions are not supported - outputs a comment
2120
+ */
2121
+ createExtension(extensionName: CommonPostgresExtensions, ifNotExists?: boolean): void;
2122
+ createExtension(extensionName: string, ifNotExists?: boolean): void;
2068
2123
  private generateAstInstance;
2069
2124
  }
2070
2125
 
@@ -3780,6 +3835,7 @@ declare class SqlDataSource<D extends SqlDataSourceType = SqlDataSourceType, T e
3780
3835
  tsconfig?: string;
3781
3836
  lock: boolean;
3782
3837
  transactional: boolean;
3838
+ lockTimeout?: number;
3783
3839
  };
3784
3840
  /**
3785
3841
  * @description AdminJS configuration options