1 | import { AdapterBase } from '@feathersjs/adapter-commons';
|
2 | import type { PaginationOptions } from '@feathersjs/adapter-commons';
|
3 | import type { SequelizeAdapterOptions, SequelizeAdapterParams } from './declarations';
|
4 | import type { Id, NullableId, Paginated, Query } from '@feathersjs/feathers';
|
5 | import type { FindOptions } from 'sequelize';
|
6 | export declare class SequelizeAdapter<Result, Data = Partial<Result>, ServiceParams extends SequelizeAdapterParams = SequelizeAdapterParams, PatchData = Partial<Data>> extends AdapterBase<Result, Data, PatchData, ServiceParams, SequelizeAdapterOptions> {
|
7 | constructor(options: SequelizeAdapterOptions);
|
8 | get raw(): boolean;
|
9 | get Op(): any;
|
10 | get Model(): import("sequelize").ModelStatic<any>;
|
11 | getModel(_params?: ServiceParams): import("sequelize").ModelStatic<any>;
|
12 | /**
|
13 | * @deprecated use 'service.ModelWithScope' instead. 'applyScope' will be removed in a future release.
|
14 | */
|
15 | applyScope(params?: ServiceParams): import("sequelize").ModelStatic<any>;
|
16 | ModelWithScope(params: ServiceParams): import("sequelize").ModelStatic<any>;
|
17 | convertOperators(q: any): Query;
|
18 | filterQuery(params: ServiceParams): {
|
19 | filters: {
|
20 | [key: string]: any;
|
21 | };
|
22 | query: Query;
|
23 | paginate: import("@feathersjs/adapter-commons").PaginationParams;
|
24 | };
|
25 | paramsToAdapter(id: NullableId, _params?: ServiceParams): FindOptions;
|
26 | |
27 |
|
28 |
|
29 |
|
30 | _getOrFind(id: Id, _params?: ServiceParams): Promise<Result>;
|
31 | _getOrFind(id: null, _params?: ServiceParams): Promise<Result[]>;
|
32 | _find(params?: ServiceParams & {
|
33 | paginate?: PaginationOptions;
|
34 | }): Promise<Paginated<Result>>;
|
35 | _find(params?: ServiceParams & {
|
36 | paginate: false;
|
37 | }): Promise<Result[]>;
|
38 | _find(params?: ServiceParams): Promise<Paginated<Result> | Result[]>;
|
39 | _get(id: Id, params?: ServiceParams): Promise<Result>;
|
40 | _create(data: Data, params?: ServiceParams): Promise<Result>;
|
41 | _create(data: Data[], params?: ServiceParams): Promise<Result[]>;
|
42 | _create(data: Data | Data[], params?: ServiceParams): Promise<Result | Result[]>;
|
43 | _patch(id: null, data: PatchData, params?: ServiceParams): Promise<Result[]>;
|
44 | _patch(id: Id, data: PatchData, params?: ServiceParams): Promise<Result>;
|
45 | _update(id: Id, data: Data, params?: ServiceParams): Promise<Result>;
|
46 | _remove(id: null, params?: ServiceParams): Promise<Result[]>;
|
47 | _remove(id: Id, params?: ServiceParams): Promise<Result>;
|
48 | }
|