Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • Returns default

Properties

$modelClass

$modelClass: ModelClass<default>

QueryBuilderType

QueryBuilderType: QueryBuilder<default, TitresPoints[]>

contour

contour: number

coordonnees

coordonnees: ICoordonnees

Optional description

description: null | string

groupe

groupe: number

id

id: string

Optional lot

lot: null | number

Optional nom

nom: null | string

point

point: number

references

references: ITitrePointReference[]

Optional securite

securite: null | boolean

Optional slug

slug: string

Optional subsidiaire

subsidiaire: null | boolean

titreEtapeId

titreEtapeId: string

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 | string[]

Static jsonAttributes

jsonAttributes: string[]

Static jsonSchema

jsonSchema: { properties: { contour: { type: string }; coordonnees: { properties: { x: { type: string }; y: { type: string } }; type: string }; description: { type: string[] }; groupe: { type: string }; id: { type: string }; lot: { type: string[] }; nom: { type: string[] }; point: { type: string }; securite: { type: string[] }; slug: { type: string }; subsidiaire: { type: string[] }; titreEtapeId: { maxLength: number; type: string } }; required: string[]; type: string } = ...

Type declaration

  • properties: { contour: { type: string }; coordonnees: { properties: { x: { type: string }; y: { type: string } }; type: string }; description: { type: string[] }; groupe: { type: string }; id: { type: string }; lot: { type: string[] }; nom: { type: string[] }; point: { type: string }; securite: { type: string[] }; slug: { type: string }; subsidiaire: { type: string[] }; titreEtapeId: { maxLength: number; type: string } }
    • contour: { type: string }
      • type: string
    • coordonnees: { properties: { x: { type: string }; y: { type: string } }; type: string }
      • properties: { x: { type: string }; y: { type: string } }
        • x: { type: string }
          • type: string
        • y: { type: string }
          • type: string
      • type: string
    • description: { type: string[] }
      • type: string[]
    • groupe: { type: string }
      • type: string
    • id: { type: string }
      • type: string
    • lot: { type: string[] }
      • type: string[]
    • nom: { type: string[] }
      • type: string[]
    • point: { type: string }
      • type: string
    • securite: { type: string[] }
      • type: string[]
    • slug: { type: string }
      • type: string
    • subsidiaire: { type: string[] }
      • type: string[]
    • titreEtapeId: { maxLength: number; type: string }
      • maxLength: number
      • 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 tableName

tableName: string = 'titresPoints'

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(context: QueryContext): 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): 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 relationMappings

  • relationMappings(): { references: { join: { from: string; to: string }; modelClass: typeof default; relation: RelationType } }
  • Returns { references: { join: { from: string; to: string }; modelClass: typeof default; relation: RelationType } }

    • references: { join: { from: string; to: string }; modelClass: typeof default; relation: RelationType }
      • join: { from: string; to: string }
        • from: string
        • to: string
      • modelClass: typeof default
      • relation: RelationType

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