hysteria-orm 10.3.6 → 10.3.7

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';
@@ -759,6 +759,7 @@ type ForeignKeyOptions = CommonConstraintOptions & {
759
759
  onUpdate?: OnUpdateOrDelete;
760
760
  };
761
761
  type CreateTableContext = "alter_table" | "create_table";
762
+ 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
763
 
763
764
  /**
764
765
  * @description AdminJS plugin types - All AdminJS imports are done at runtime via dynamic import()
@@ -1126,6 +1127,11 @@ type MigrationConfigBase = {
1126
1127
  * @default true
1127
1128
  */
1128
1129
  lock?: boolean;
1130
+ /**
1131
+ * @description Lock timeout in milliseconds for migration advisory lock acquisition, can be overridden in the cli command
1132
+ * @default 30000
1133
+ */
1134
+ lockTimeout?: number;
1129
1135
  };
1130
1136
  /**
1131
1137
  * @description Migration configuration with transactional support for PostgreSQL and CockroachDB
@@ -1592,7 +1598,7 @@ declare class CreateTableBuilder extends BaseBuilder {
1592
1598
  constructor(sqlType: SqlDataSourceType, nodes: QueryNode[], tableName?: string, context?: "alter_table" | "create_table");
1593
1599
  private build;
1594
1600
  /**
1595
- * @description Adds a raw statement to an operation that will be executed as is
1601
+ * @description Adds a raw statement to define a default value as is
1596
1602
  * @example
1597
1603
  * ```ts
1598
1604
  * table.varchar("name").default(table.rawStatement("CURRENT_TIMESTAMP"));
@@ -1873,6 +1879,41 @@ declare class CreateTableBuilder extends BaseBuilder {
1873
1879
  * ```
1874
1880
  */
1875
1881
  rawColumn(raw: string): ConstraintBuilder;
1882
+ /**
1883
+ * Geometry data type
1884
+ * @mysql GEOMETRY
1885
+ * @postgres GEOMETRY (must have PostGIS extension)
1886
+ * @sqlite GEOMETRY must have SpatiaLite extension
1887
+ */
1888
+ geometry(name: string): ConstraintBuilder;
1889
+ /**
1890
+ * Point data type
1891
+ * @mysql POINT
1892
+ * @postgres POINT
1893
+ * @sqlite POINT must have SpatiaLite extension
1894
+ */
1895
+ point(name: string): ConstraintBuilder;
1896
+ /**
1897
+ * Linestring data type
1898
+ * @mysql LINESTRING
1899
+ * @postgres LINESTRING
1900
+ * @sqlite LINESTRING must have SpatiaLite extension
1901
+ */
1902
+ linestring(name: string): ConstraintBuilder;
1903
+ /**
1904
+ * Polygon data type
1905
+ * @mysql POLYGON
1906
+ * @postgres POLYGON
1907
+ * @sqlite POLYGON must have SpatiaLite extension
1908
+ */
1909
+ polygon(name: string): ConstraintBuilder;
1910
+ /**
1911
+ * MultiPoint data type
1912
+ * @mysql MULTIPOINT
1913
+ * @postgres MULTIPOINT
1914
+ * @sqlite MULTIPOINT must have SpatiaLite extension
1915
+ */
1916
+ multiPoint(name: string): ConstraintBuilder;
1876
1917
  getNamedConstraints(): QueryNode[];
1877
1918
  }
1878
1919
 
@@ -1881,7 +1922,7 @@ declare class AlterTableBuilder extends BaseBuilder {
1881
1922
  private sqlType;
1882
1923
  constructor(table: string, nodes: QueryNode[], sqlType: SqlDataSourceType);
1883
1924
  /**
1884
- * @description Adds a raw statement to an operation that will be executed as is
1925
+ * @description Adds a raw statement to define a default value as is
1885
1926
  * @example
1886
1927
  * ```ts
1887
1928
  * table.varchar("name").default(table.rawStatement("CURRENT_TIMESTAMP"));
@@ -1982,7 +2023,7 @@ declare class Schema {
1982
2023
  sqlType: SqlDataSourceType;
1983
2024
  constructor(sqlType?: SqlDataSourceType);
1984
2025
  /**
1985
- * @description Adds a raw statement to an operation that will be executed as is
2026
+ * @description Adds a raw statement to define a default value as is
1986
2027
  * @example
1987
2028
  * ```ts
1988
2029
  * schema.rawStatement("CURRENT_TIMESTAMP");
@@ -2065,6 +2106,16 @@ declare class Schema {
2065
2106
  * @description Drops a constraint from a table
2066
2107
  */
2067
2108
  dropConstraint(table: string, constraintName: string): void;
2109
+ /**
2110
+ * @description Create database extension, only supported for postgres
2111
+ * @postgres Supports extensions like PostGIS, uuid-ossp, hstore, etc.
2112
+ * @mysql Extensions are not supported - outputs a comment
2113
+ * @sqlite Extensions are loaded dynamically - outputs a comment
2114
+ * @mssql Extensions are not supported - outputs a comment
2115
+ * @oracledb Extensions are not supported - outputs a comment
2116
+ */
2117
+ createExtension(extensionName: CommonPostgresExtensions, ifNotExists?: boolean): void;
2118
+ createExtension(extensionName: string, ifNotExists?: boolean): void;
2068
2119
  private generateAstInstance;
2069
2120
  }
2070
2121
 
@@ -3780,6 +3831,7 @@ declare class SqlDataSource<D extends SqlDataSourceType = SqlDataSourceType, T e
3780
3831
  tsconfig?: string;
3781
3832
  lock: boolean;
3782
3833
  transactional: boolean;
3834
+ lockTimeout?: number;
3783
3835
  };
3784
3836
  /**
3785
3837
  * @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';
@@ -759,6 +759,7 @@ type ForeignKeyOptions = CommonConstraintOptions & {
759
759
  onUpdate?: OnUpdateOrDelete;
760
760
  };
761
761
  type CreateTableContext = "alter_table" | "create_table";
762
+ 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
763
 
763
764
  /**
764
765
  * @description AdminJS plugin types - All AdminJS imports are done at runtime via dynamic import()
@@ -1126,6 +1127,11 @@ type MigrationConfigBase = {
1126
1127
  * @default true
1127
1128
  */
1128
1129
  lock?: boolean;
1130
+ /**
1131
+ * @description Lock timeout in milliseconds for migration advisory lock acquisition, can be overridden in the cli command
1132
+ * @default 30000
1133
+ */
1134
+ lockTimeout?: number;
1129
1135
  };
1130
1136
  /**
1131
1137
  * @description Migration configuration with transactional support for PostgreSQL and CockroachDB
@@ -1592,7 +1598,7 @@ declare class CreateTableBuilder extends BaseBuilder {
1592
1598
  constructor(sqlType: SqlDataSourceType, nodes: QueryNode[], tableName?: string, context?: "alter_table" | "create_table");
1593
1599
  private build;
1594
1600
  /**
1595
- * @description Adds a raw statement to an operation that will be executed as is
1601
+ * @description Adds a raw statement to define a default value as is
1596
1602
  * @example
1597
1603
  * ```ts
1598
1604
  * table.varchar("name").default(table.rawStatement("CURRENT_TIMESTAMP"));
@@ -1873,6 +1879,41 @@ declare class CreateTableBuilder extends BaseBuilder {
1873
1879
  * ```
1874
1880
  */
1875
1881
  rawColumn(raw: string): ConstraintBuilder;
1882
+ /**
1883
+ * Geometry data type
1884
+ * @mysql GEOMETRY
1885
+ * @postgres GEOMETRY (must have PostGIS extension)
1886
+ * @sqlite GEOMETRY must have SpatiaLite extension
1887
+ */
1888
+ geometry(name: string): ConstraintBuilder;
1889
+ /**
1890
+ * Point data type
1891
+ * @mysql POINT
1892
+ * @postgres POINT
1893
+ * @sqlite POINT must have SpatiaLite extension
1894
+ */
1895
+ point(name: string): ConstraintBuilder;
1896
+ /**
1897
+ * Linestring data type
1898
+ * @mysql LINESTRING
1899
+ * @postgres LINESTRING
1900
+ * @sqlite LINESTRING must have SpatiaLite extension
1901
+ */
1902
+ linestring(name: string): ConstraintBuilder;
1903
+ /**
1904
+ * Polygon data type
1905
+ * @mysql POLYGON
1906
+ * @postgres POLYGON
1907
+ * @sqlite POLYGON must have SpatiaLite extension
1908
+ */
1909
+ polygon(name: string): ConstraintBuilder;
1910
+ /**
1911
+ * MultiPoint data type
1912
+ * @mysql MULTIPOINT
1913
+ * @postgres MULTIPOINT
1914
+ * @sqlite MULTIPOINT must have SpatiaLite extension
1915
+ */
1916
+ multiPoint(name: string): ConstraintBuilder;
1876
1917
  getNamedConstraints(): QueryNode[];
1877
1918
  }
1878
1919
 
@@ -1881,7 +1922,7 @@ declare class AlterTableBuilder extends BaseBuilder {
1881
1922
  private sqlType;
1882
1923
  constructor(table: string, nodes: QueryNode[], sqlType: SqlDataSourceType);
1883
1924
  /**
1884
- * @description Adds a raw statement to an operation that will be executed as is
1925
+ * @description Adds a raw statement to define a default value as is
1885
1926
  * @example
1886
1927
  * ```ts
1887
1928
  * table.varchar("name").default(table.rawStatement("CURRENT_TIMESTAMP"));
@@ -1982,7 +2023,7 @@ declare class Schema {
1982
2023
  sqlType: SqlDataSourceType;
1983
2024
  constructor(sqlType?: SqlDataSourceType);
1984
2025
  /**
1985
- * @description Adds a raw statement to an operation that will be executed as is
2026
+ * @description Adds a raw statement to define a default value as is
1986
2027
  * @example
1987
2028
  * ```ts
1988
2029
  * schema.rawStatement("CURRENT_TIMESTAMP");
@@ -2065,6 +2106,16 @@ declare class Schema {
2065
2106
  * @description Drops a constraint from a table
2066
2107
  */
2067
2108
  dropConstraint(table: string, constraintName: string): void;
2109
+ /**
2110
+ * @description Create database extension, only supported for postgres
2111
+ * @postgres Supports extensions like PostGIS, uuid-ossp, hstore, etc.
2112
+ * @mysql Extensions are not supported - outputs a comment
2113
+ * @sqlite Extensions are loaded dynamically - outputs a comment
2114
+ * @mssql Extensions are not supported - outputs a comment
2115
+ * @oracledb Extensions are not supported - outputs a comment
2116
+ */
2117
+ createExtension(extensionName: CommonPostgresExtensions, ifNotExists?: boolean): void;
2118
+ createExtension(extensionName: string, ifNotExists?: boolean): void;
2068
2119
  private generateAstInstance;
2069
2120
  }
2070
2121
 
@@ -3780,6 +3831,7 @@ declare class SqlDataSource<D extends SqlDataSourceType = SqlDataSourceType, T e
3780
3831
  tsconfig?: string;
3781
3832
  lock: boolean;
3782
3833
  transactional: boolean;
3834
+ lockTimeout?: number;
3783
3835
  };
3784
3836
  /**
3785
3837
  * @description AdminJS configuration options