hysteria-orm 10.6.2 → 10.6.4

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
@@ -4559,11 +4559,19 @@ declare class ModelQueryBuilder<T extends Model, S extends Record<string, any> =
4559
4559
  /**
4560
4560
  * @description Inserts a new record into the database, it is not advised to use this method directly from the query builder if using a ModelQueryBuilder (`Model.query()`), use the `Model.insert` method instead.
4561
4561
  */
4562
- insert(modelData: Partial<ModelWithoutRelations<T>>, returning: readonly (ModelKey<T> | "*")[] | undefined): WriteOperation<any>;
4562
+ insert<const R extends ReturningColumns<T> = undefined>(...args: Parameters<typeof Model.insert<T, R>>): ReturnType<typeof Model.insert<T, R>>;
4563
4563
  /**
4564
4564
  * @description Inserts multiple records into the database, it is not advised to use this method directly from the query builder if using a ModelQueryBuilder (`Model.query()`), use the `Model.insertMany` method instead.
4565
4565
  */
4566
- insertMany(modelsData: Partial<ModelWithoutRelations<T>>[], returning: readonly (ModelKey<T> | "*")[] | undefined): WriteOperation<any>;
4566
+ insertMany<const R extends ReturningColumns<T> = undefined>(...args: Parameters<typeof Model.insertMany<T, R>>): ReturnType<typeof Model.insertMany<T, R>>;
4567
+ /**
4568
+ * @description Upserts a record (insert or update on conflict). It is not advised to use this method directly from the query builder if using a ModelQueryBuilder (`Model.query()`), use the `Model.upsert` method instead.
4569
+ */
4570
+ upsert<const R extends ReturningColumns<T> = undefined>(...args: Parameters<typeof Model.upsert<T, R>>): ReturnType<typeof Model.upsert<T, R>>;
4571
+ /**
4572
+ * @description Upserts multiple records (insert or update on conflict). It is not advised to use this method directly from the query builder if using a ModelQueryBuilder (`Model.query()`), use the `Model.upsertMany` method instead.
4573
+ */
4574
+ upsertMany<const R extends ReturningColumns<T> = undefined>(...args: Parameters<typeof Model.upsertMany<T, R>>): ReturnType<typeof Model.upsertMany<T, R>>;
4567
4575
  update(data: Partial<ModelWithoutRelations<T>>, options?: UpdateOptions): WriteOperation<number>;
4568
4576
  softDelete(options?: SoftDeleteOptions<T>): WriteOperation<number>;
4569
4577
  delete(options?: DeleteOptions): WriteOperation<number>;
package/lib/index.d.ts CHANGED
@@ -4559,11 +4559,19 @@ declare class ModelQueryBuilder<T extends Model, S extends Record<string, any> =
4559
4559
  /**
4560
4560
  * @description Inserts a new record into the database, it is not advised to use this method directly from the query builder if using a ModelQueryBuilder (`Model.query()`), use the `Model.insert` method instead.
4561
4561
  */
4562
- insert(modelData: Partial<ModelWithoutRelations<T>>, returning: readonly (ModelKey<T> | "*")[] | undefined): WriteOperation<any>;
4562
+ insert<const R extends ReturningColumns<T> = undefined>(...args: Parameters<typeof Model.insert<T, R>>): ReturnType<typeof Model.insert<T, R>>;
4563
4563
  /**
4564
4564
  * @description Inserts multiple records into the database, it is not advised to use this method directly from the query builder if using a ModelQueryBuilder (`Model.query()`), use the `Model.insertMany` method instead.
4565
4565
  */
4566
- insertMany(modelsData: Partial<ModelWithoutRelations<T>>[], returning: readonly (ModelKey<T> | "*")[] | undefined): WriteOperation<any>;
4566
+ insertMany<const R extends ReturningColumns<T> = undefined>(...args: Parameters<typeof Model.insertMany<T, R>>): ReturnType<typeof Model.insertMany<T, R>>;
4567
+ /**
4568
+ * @description Upserts a record (insert or update on conflict). It is not advised to use this method directly from the query builder if using a ModelQueryBuilder (`Model.query()`), use the `Model.upsert` method instead.
4569
+ */
4570
+ upsert<const R extends ReturningColumns<T> = undefined>(...args: Parameters<typeof Model.upsert<T, R>>): ReturnType<typeof Model.upsert<T, R>>;
4571
+ /**
4572
+ * @description Upserts multiple records (insert or update on conflict). It is not advised to use this method directly from the query builder if using a ModelQueryBuilder (`Model.query()`), use the `Model.upsertMany` method instead.
4573
+ */
4574
+ upsertMany<const R extends ReturningColumns<T> = undefined>(...args: Parameters<typeof Model.upsertMany<T, R>>): ReturnType<typeof Model.upsertMany<T, R>>;
4567
4575
  update(data: Partial<ModelWithoutRelations<T>>, options?: UpdateOptions): WriteOperation<number>;
4568
4576
  softDelete(options?: SoftDeleteOptions<T>): WriteOperation<number>;
4569
4577
  delete(options?: DeleteOptions): WriteOperation<number>;