Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • Returns default

Properties

$modelClass

$modelClass: ModelClass<default>

QueryBuilderType

QueryBuilderType: QueryBuilder<default, EtapesTypesJustificatifsTypes[]>

documentTypeId

documentTypeId: string

etapeTypeId

etapeTypeId: string

Optional optionnel

optionnel: boolean

Static BelongsToOneRelation

BelongsToOneRelation: RelationType

Static HasManyRelation

HasManyRelation: RelationType

Static HasOneRelation

HasOneRelation: RelationType

Static HasOneThroughRelation

HasOneThroughRelation: RelationType

Static ManyToManyRelation

ManyToManyRelation: RelationType

Static QueryBuilder

QueryBuilder: typeof QueryBuilder

Static columnNameMappers

columnNameMappers: ColumnNameMappers

Static dbRefProp

dbRefProp: string

Static Optional defaultGraphOptions

defaultGraphOptions: GraphOptions

Static fn

fn: FunctionFunction

Static idColumn

idColumn: string[] = ...

Static jsonAttributes

jsonAttributes: string[]

Static jsonSchema

jsonSchema: { properties: { description: { type: string[] }; documentTypeId: { maxLength: number; type: string }; etapeTypeId: { maxLength: number; type: string }; optionnel: { type: string } }; required: string[]; type: string } = ...

Type declaration

  • properties: { description: { type: string[] }; documentTypeId: { maxLength: number; type: string }; etapeTypeId: { maxLength: number; type: string }; optionnel: { type: string } }
    • description: { type: string[] }
      • type: string[]
    • documentTypeId: { maxLength: number; type: string }
      • maxLength: number
      • type: string
    • etapeTypeId: { maxLength: number; type: string }
      • maxLength: number
      • type: string
    • optionnel: { type: string }
      • type: string
  • required: string[]
  • type: string

Static modelPaths

modelPaths: string[]

Static modifiers

modifiers: Modifiers<AnyQueryBuilder>

Static pickJsonSchemaProperties

pickJsonSchemaProperties: boolean

Static propRefRegex

propRefRegex: RegExp

Static raw

raw: RawFunction

Static ref

ref: ReferenceFunction

Static relatedFindQueryMutates

relatedFindQueryMutates: boolean

Static relatedInsertQueryMutates

relatedInsertQueryMutates: boolean

Static relationMappings

relationMappings: RelationMappings | RelationMappingsThunk

Static tableName

tableName: string = 'etapesTypes__justificatifsTypes'

Static uidProp

uidProp: string

Static uidRefProp

uidRefProp: string

Static useLimitInFirst

useLimitInFirst: boolean

Static virtualAttributes

virtualAttributes: string[]

Methods

$afterDelete

  • $afterDelete(queryContext: QueryContext): void | Promise<any>

$afterFind

  • $afterFind(queryContext: QueryContext): void | Promise<any>

$afterGet

  • $afterGet(queryContext: QueryContext): void | Promise<any>

$afterInsert

  • $afterInsert(queryContext: QueryContext): void | Promise<any>

$afterUpdate

  • $afterUpdate(opt: ModelOptions, queryContext: QueryContext): void | Promise<any>

$afterValidate

  • $afterValidate(json: Pojo, opt: ModelOptions): void

$appendRelated

  • $appendRelated<RM>(relation: String | Relation, related: undefined | null | RM | RM[]): default

$beforeDelete

  • $beforeDelete(queryContext: QueryContext): void | Promise<any>

$beforeInsert

  • $beforeInsert(queryContext: QueryContext): void | Promise<any>

$beforeUpdate

  • $beforeUpdate(opt: ModelOptions, queryContext: QueryContext): void | Promise<any>

$beforeValidate

  • $beforeValidate(jsonSchema: JSONSchema, json: Pojo, opt: ModelOptions): JSONSchema

$clone

  • $clone(opt?: CloneOptions): default

$fetchGraph

  • $fetchGraph(expression: RelationExpression<M>, options?: FetchGraphOptions): QueryBuilder<default, default>

$formatDatabaseJson

  • $formatDatabaseJson(json: Pojo): Pojo

$formatJson

  • $formatJson(json: Pojo): Pojo

$id

  • $id(id: any): void
  • $id(): any

$knex

  • $knex(): Knex<any, Record<string, any>[]>

$omit

  • $omit(keys: string | string[] | {}): default

$parseDatabaseJson

  • $parseDatabaseJson(json: Pojo): Pojo

$parseJson

  • $parseJson(json: Pojo, opt?: ModelOptions): Pojo

$pick

  • $pick(keys: string | string[] | {}): default

$query

  • $query(trxOrKnex?: TransactionOrKnex): QueryBuilder<default, default>

$relatedQuery

  • $relatedQuery<K>(relationName: K, trxOrKnex?: TransactionOrKnex): RelatedQueryBuilder<default[K]>
  • $relatedQuery<RM>(relationName: string, trxOrKnex?: TransactionOrKnex): QueryBuilderType<RM>

$set

$setDatabaseJson

  • $setDatabaseJson(json: object): default

$setJson

  • $setJson(json: object, opt?: ModelOptions): default

$setRelated

  • $setRelated<RM>(relation: String | Relation, related: undefined | null | RM | RM[]): default

$toDatabaseJson

  • $toDatabaseJson(): Pojo

$toJson

  • $toJson(opt?: ToJsonOptions): ModelObject<default>

$transaction

  • $transaction(): Knex<any, Record<string, any>[]>

$traverse

  • $traverse(filterConstructor: typeof Model, traverser: TraverserFunction): default
  • $traverse(traverser: TraverserFunction): default

$traverseAsync

  • $traverseAsync(filterConstructor: typeof Model, traverser: TraverserFunction): Promise<default>
  • $traverseAsync(traverser: TraverserFunction): Promise<default>

$validate

  • $validate(json?: Pojo, opt?: ModelOptions): Pojo

toJSON

  • toJSON(opt?: ToJsonOptions): ModelObject<default>

Static afterDelete

  • afterDelete(args: StaticHookArguments<any, any>): any

Static afterFind

  • afterFind(args: StaticHookArguments<any, any>): any

Static afterInsert

  • afterInsert(args: StaticHookArguments<any, any>): any

Static afterUpdate

  • afterUpdate(args: StaticHookArguments<any, any>): any

Static beforeDelete

  • beforeDelete(args: StaticHookArguments<any, any>): any

Static beforeFind

  • beforeFind(args: StaticHookArguments<any, any>): any

Static beforeInsert

  • beforeInsert(args: StaticHookArguments<any, any>): any

Static beforeUpdate

  • beforeUpdate(args: StaticHookArguments<any, any>): any

Static bindKnex

  • bindKnex<M>(trxOrKnex: TransactionOrKnex): M

Static bindTransaction

  • bindTransaction<M>(trxOrKnex: TransactionOrKnex): M

Static createNotFoundError

  • createNotFoundError(queryContext: QueryContext, args: CreateNotFoundErrorArgs): Error

Static createValidationError

  • createValidationError(args: CreateValidationErrorArgs): Error

Static createValidator

  • createValidator(): Validator

Static fetchGraph

  • fetchGraph<M>(modelOrObject: PartialModelObject<M>, expression: RelationExpression<M>, options?: FetchGraphOptions): SingleQueryBuilder<QueryBuilderType<M>>
  • fetchGraph<M>(modelOrObject: PartialModelObject<M>[], expression: RelationExpression<M>, options?: FetchGraphOptions): QueryBuilderType<M>

Static fetchTableMetadata

  • fetchTableMetadata(opt?: FetchTableMetadataOptions): Promise<TableMetadata>

Static fromDatabaseJson

  • fromDatabaseJson<M>(json: object): M

Static fromJson

  • fromJson<M>(json: object, opt?: ModelOptions): M

Static getRelation

  • getRelation(name: string): Relation

Static getRelations

  • getRelations(): Relations

Static knex

  • knex(knex?: Knex<any, Record<string, any>[]>): Knex<any, Record<string, any>[]>

Static knexQuery

  • knexQuery(): QueryBuilder<any, any>

Static query

  • query<M>(trxOrKnex?: TransactionOrKnex): QueryBuilderType<M>

Static relatedQuery

  • relatedQuery<M, K>(relationName: K, trxOrKnex?: TransactionOrKnex): ArrayRelatedQueryBuilder<M[K]>
  • relatedQuery<RM>(relationName: string, trxOrKnex?: TransactionOrKnex): QueryBuilderType<RM>

Static startTransaction

  • startTransaction(knexOrTransaction?: TransactionOrKnex): Promise<Transaction>

Static tableMetadata

  • tableMetadata(opt?: TableMetadataOptions): TableMetadata

Static transaction

  • transaction<T>(callback: (trx: Transaction) => Promise<T>): Promise<T>
  • transaction<T>(trxOrKnex: TransactionOrKnex, callback: (trx: Transaction) => Promise<T>): Promise<T>

Static traverse

  • traverse(models: Model | Model[], traverser: TraverserFunction): void
  • traverse(filterConstructor: typeof Model, models: Model | Model[], traverser: TraverserFunction): void

Static traverseAsync

  • traverseAsync(models: Model | Model[], traverser: TraverserFunction): Promise<void>
  • traverseAsync(filterConstructor: typeof Model, models: Model | Model[], traverser: TraverserFunction): Promise<void>

Generated using TypeDoc