@palmares/drizzle-engine
Version:
This is the engine that wraps the hole drizzle interface in a way palmares can understand and have full control of
54 lines • 3.65 kB
TypeScript
import type { ModelOptionsType } from '@palmares/databases';
export declare const models: typeof import("@palmares/databases").AdapterModels & {
new <TModel>(): import("@palmares/databases").AdapterModels<TModel> & {
translateOptions: (_engine: import("@palmares/databases").DatabaseAdapter<any, import("@palmares/databases").AdapterFields, import("@palmares/databases").AdapterModels<any>, import("@palmares/databases").AdapterQuery, import("@palmares/databases").AdapterMigrations>, modelName: string, options: ModelOptionsType) => Promise<object>;
translateFields: ((_engine: import("@palmares/databases").DatabaseAdapter, _modelName: string, _fieldEntriesOfModel: [string, import("@palmares/databases").Field][], _model: import("@palmares/databases").ModelBaseClass, _defaultTranslateFieldCallback: (_field: import("@palmares/databases").Field) => Promise<any>, _defaultTranslateFieldsCallback: () => Promise<{
[key: string]: any;
}>) => Promise<{
[key: string]: any;
}>) | undefined;
translate: (_engine: import("@palmares/databases").DatabaseAdapter<any, import("@palmares/databases").AdapterFields, import("@palmares/databases").AdapterModels<any>, import("@palmares/databases").AdapterQuery, import("@palmares/databases").AdapterMigrations>, _modelName: string, _model: import("@palmares/databases").ModelBaseClass, _fieldEntriesOfModel: [string, import("@palmares/databases").Field<{
create: any;
read: any;
update: any;
}, {
unique: false;
allowNull: false;
dbIndex: false;
underscored: true;
hasDefaultValue: false;
isPrimaryKey: false;
auto: false;
defaultValue: undefined;
typeName: string;
databaseName: undefined;
engineInstance: import("@palmares/databases").DatabaseAdapter;
customAttributes: any;
}, import("@palmares/databases/dist/src/models/fields/types").FieldWithOperationTypeForSearch<any>>][], _modelOptions: Omit<ModelOptionsType, "customOptions">, _customModelOptions: {
userOptions: any;
fields: any;
}, defaultTranslateCallback: () => Promise<{
options: any;
fields: any;
}>, _: (_field: import("@palmares/databases").Field) => Promise<any>, __: () => Promise<{
[key: string]: any;
}>) => Promise<{
fields: Record<string, string>;
options: ModelOptionsType;
}>;
compare: ((_oldCustomArguments: any, _newCustomArguments: any) => boolean) | undefined;
modelToString: ((_customArguments: any) => {
result: string;
imports: {
import: string;
from: string;
}[];
}) | undefined;
afterModelsTranslation: (engine: import("@palmares/databases").DatabaseAdapter<any, import("@palmares/databases").AdapterFields, import("@palmares/databases").AdapterModels<any>, import("@palmares/databases").AdapterQuery, import("@palmares/databases").AdapterMigrations>, models: [string, any][]) => Promise<[string, any][]>;
setGetTranslatedModels: <TGetTranslatedModelsFunction extends () => any>(getTranslatedModels: TGetTranslatedModelsFunction) => Omit<import("@palmares/databases").AdapterModels<TModel>, "getTranslatedModels"> & {
getTranslatedModels: TGetTranslatedModelsFunction;
};
};
customOptions: typeof import("@palmares/databases").AdapterModels.customOptions | undefined;
};
//# sourceMappingURL=model.d.ts.map