hysteria-orm 11.0.7 → 11.0.9

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
@@ -1997,6 +1997,14 @@ declare class InterpreterUtils {
1997
1997
  private readonly autoUpdateColumns;
1998
1998
  constructor(model: typeof Model);
1999
1999
  formatStringColumn(dbType: SqlDataSourceType, column: string): string;
2000
+ /**
2001
+ * @description Formats a column WITHOUT table qualification.
2002
+ * ON CONFLICT target lists (Postgres/SQLite) and `excluded.<col>` refs require
2003
+ * bare column names; table-qualified ModelKey refs like "sets.id" must reduce to
2004
+ * "id". Mirrors formatStringColumn's qualified branch (split(".")[1]) so the
2005
+ * bare output is identical minus the "table". prefix.
2006
+ */
2007
+ formatStringColumnBare(dbType: SqlDataSourceType, column: string): string;
2000
2008
  /**
2001
2009
  * @description Formats the table name for the database type, idempotent for quoting
2002
2010
  */
@@ -2072,15 +2080,15 @@ declare class ModelManager<T extends Model> {
2072
2080
  /**
2073
2081
  * @description Finds all records that match the input
2074
2082
  */
2075
- find<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input?: FindType<T, S, R>): Promise<ModelWithoutRelations<T>[]>;
2083
+ find<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input?: FindType<T, S, R>): Promise<FindReturnType<T, S, R>[]>;
2076
2084
  /**
2077
2085
  * @description Finds the first record that matches the input
2078
2086
  */
2079
- findOne<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input: FindOneType<T, S, R>): Promise<ModelWithoutRelations<T> | null>;
2087
+ findOne<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input: FindOneType<T, S, R>): Promise<FindReturnType<T, S, R> | null>;
2080
2088
  /**
2081
2089
  * @description Finds the first record that matches the input or throws an error
2082
2090
  */
2083
- findOneOrFail<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input: FindOneType<T, S, R>): Promise<ModelWithoutRelations<T>>;
2091
+ findOneOrFail<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input: FindOneType<T, S, R>): Promise<FindReturnType<T, S, R>>;
2084
2092
  /**
2085
2093
  * @description Finds a record by its primary key
2086
2094
  * @description Ignores all model hooks
@@ -6193,15 +6201,15 @@ declare class ModelQueryBuilder<T extends Model, S extends Record<string, any> =
6193
6201
  /**
6194
6202
  * @description Finds multiple records.
6195
6203
  */
6196
- find<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input?: FindType<T, MK, MR>): Promise<ModelWithoutRelations<T>[]>;
6204
+ find<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input?: FindType<T, MK, MR>): Promise<FindReturnType<T, MK, MR>[]>;
6197
6205
  /**
6198
6206
  * @description Finds a single record.
6199
6207
  */
6200
- findOne<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input: FindOneType<T, MK, MR>): Promise<ModelWithoutRelations<T> | null>;
6208
+ findOne<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input: FindOneType<T, MK, MR>): Promise<FindReturnType<T, MK, MR> | null>;
6201
6209
  /**
6202
6210
  * @description Finds a single record or throws.
6203
6211
  */
6204
- findOneOrFail<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input: FindOneType<T, MK, MR>): Promise<ModelWithoutRelations<T>>;
6212
+ findOneOrFail<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input: FindOneType<T, MK, MR>): Promise<FindReturnType<T, MK, MR>>;
6205
6213
  /**
6206
6214
  * @description Finds a single record by primary key.
6207
6215
  */
package/lib/index.d.ts CHANGED
@@ -1997,6 +1997,14 @@ declare class InterpreterUtils {
1997
1997
  private readonly autoUpdateColumns;
1998
1998
  constructor(model: typeof Model);
1999
1999
  formatStringColumn(dbType: SqlDataSourceType, column: string): string;
2000
+ /**
2001
+ * @description Formats a column WITHOUT table qualification.
2002
+ * ON CONFLICT target lists (Postgres/SQLite) and `excluded.<col>` refs require
2003
+ * bare column names; table-qualified ModelKey refs like "sets.id" must reduce to
2004
+ * "id". Mirrors formatStringColumn's qualified branch (split(".")[1]) so the
2005
+ * bare output is identical minus the "table". prefix.
2006
+ */
2007
+ formatStringColumnBare(dbType: SqlDataSourceType, column: string): string;
2000
2008
  /**
2001
2009
  * @description Formats the table name for the database type, idempotent for quoting
2002
2010
  */
@@ -2072,15 +2080,15 @@ declare class ModelManager<T extends Model> {
2072
2080
  /**
2073
2081
  * @description Finds all records that match the input
2074
2082
  */
2075
- find<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input?: FindType<T, S, R>): Promise<ModelWithoutRelations<T>[]>;
2083
+ find<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input?: FindType<T, S, R>): Promise<FindReturnType<T, S, R>[]>;
2076
2084
  /**
2077
2085
  * @description Finds the first record that matches the input
2078
2086
  */
2079
- findOne<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input: FindOneType<T, S, R>): Promise<ModelWithoutRelations<T> | null>;
2087
+ findOne<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input: FindOneType<T, S, R>): Promise<FindReturnType<T, S, R> | null>;
2080
2088
  /**
2081
2089
  * @description Finds the first record that matches the input or throws an error
2082
2090
  */
2083
- findOneOrFail<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input: FindOneType<T, S, R>): Promise<ModelWithoutRelations<T>>;
2091
+ findOneOrFail<S extends ModelKey<T>[] = never[], R extends ModelRelation<T>[] = never[]>(input: FindOneType<T, S, R>): Promise<FindReturnType<T, S, R>>;
2084
2092
  /**
2085
2093
  * @description Finds a record by its primary key
2086
2094
  * @description Ignores all model hooks
@@ -6193,15 +6201,15 @@ declare class ModelQueryBuilder<T extends Model, S extends Record<string, any> =
6193
6201
  /**
6194
6202
  * @description Finds multiple records.
6195
6203
  */
6196
- find<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input?: FindType<T, MK, MR>): Promise<ModelWithoutRelations<T>[]>;
6204
+ find<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input?: FindType<T, MK, MR>): Promise<FindReturnType<T, MK, MR>[]>;
6197
6205
  /**
6198
6206
  * @description Finds a single record.
6199
6207
  */
6200
- findOne<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input: FindOneType<T, MK, MR>): Promise<ModelWithoutRelations<T> | null>;
6208
+ findOne<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input: FindOneType<T, MK, MR>): Promise<FindReturnType<T, MK, MR> | null>;
6201
6209
  /**
6202
6210
  * @description Finds a single record or throws.
6203
6211
  */
6204
- findOneOrFail<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input: FindOneType<T, MK, MR>): Promise<ModelWithoutRelations<T>>;
6212
+ findOneOrFail<MK extends ModelKey<T>[] = never[], MR extends ModelRelation<T>[] = never[]>(input: FindOneType<T, MK, MR>): Promise<FindReturnType<T, MK, MR>>;
6205
6213
  /**
6206
6214
  * @description Finds a single record by primary key.
6207
6215
  */