@nodecfdi/adonisjs-sat-catalogs
    Preparing search index...

    Class NominaTiposJornadas

    Hierarchy

    • BaseModel
      • NominaTiposJornadas
    Index

    Constructors

    • Returns NominaTiposJornadas

    Properties

    $attributes: ModelObject
    $columns: undefined

    Columns is a property to get type information for model attributes. This must be declared by the end user

    $dirty: ModelObject
    $extras: ModelObject
    $isDeleted: boolean
    $isDirty: boolean
    $isLocal: boolean
    $isNew: boolean
    $isPersisted: boolean
    $options?: ModelOptions
    $original: ModelObject
    $preloaded: { [relation: string]: LucidRow | LucidRow[] }
    $primaryKeyValue?: string | number
    $sideloaded: ModelObject
    $trx?: TransactionClientContract
    id: string
    load: LucidRowPreload<NominaTiposJornadas>

    Load relationships onto the instance

    loadAggregate: <
        Self extends NominaTiposJornadas,
        Name extends string | number | symbol,
        RelatedBuilder = NonNullable<Self[Name]> extends ModelRelations<
            LucidModel,
            LucidModel,
        >
            ? (ModelRelations<LucidModel, LucidModel> & Self[Name] & {})["subQuery"]
            : never,
    >(
        name: Name,
        callback: (builder: RelatedBuilder) => void,
    ) => LazyLoadAggregatesContract<Self>

    Load aggregates

    loadCount: <
        Self extends NominaTiposJornadas,
        Name extends string | number | symbol,
        RelatedBuilder = NonNullable<Self[Name]> extends ModelRelations<
            LucidModel,
            LucidModel,
        >
            ? (ModelRelations<LucidModel, LucidModel> & Self[Name] & {})["subQuery"]
            : never,
    >(
        name: Name,
        callback?: (builder: RelatedBuilder) => void,
    ) => LazyLoadAggregatesContract<Self>

    Load count

    loadOnce: LucidRowPreloadOnce<NominaTiposJornadas>

    Load relationships onto the instance, but only if they are not already preloaded

    preload: LucidRowPreload<NominaTiposJornadas>

    Alias for "load"

    texto: string
    $adapter: AdapterContract

    Adapter to work as a bridge between query builder and the model

    $columnsDefinitions: Map<string, ModelColumnOptions>

    A map of defined columns

    $computedDefinitions: Map<string, ComputedOptions>

    A map of computed properties

    $hooks: Hooks<any>

    Reference to hooks

    $keys: {
        attributesToColumns: ModelKeysContract;
        attributesToSerialized: ModelKeysContract;
        columnsToAttributes: ModelKeysContract;
        columnsToSerialized: ModelKeysContract;
        serializedToAttributes: ModelKeysContract;
        serializedToColumns: ModelKeysContract;
    }

    A copy of internal keys mapping. One should be able to resolve between all key versions

    $relationsDefinitions: Map<string, RelationshipsContract>

    A map of defined relationships

    booted: boolean

    Whether or not model has been booted. After this model configurations are ignored

    connection: "satcatalogs" = 'satcatalogs'
    namingStrategy: NamingStrategyContract

    Naming strategy to use

    primaryKey: string

    The primary key for finding unique referencing to a model

    selfAssignPrimaryKey: boolean

    Self assign the primary instead of relying on the database to return it back

    table: "nomina_tipos_jornadas" = 'nomina_tipos_jornadas'
    transaction: TransactionFn

    Returns transaction client from the model. It is same as calling "db.transaction"

    Methods

    • Consume the adapter result and hydrate the model

      Parameters

      • adapterResult: ModelObject
      • OptionalsideloadAttributes: ModelObject

      Returns void

    • Parameters

      • key: string

      Returns any

    • Parameters

      • key: string
      • callback: (value: any) => any

      Returns any

    • Gives an option to the end user to define constraints for update, insert and delete queries. Since the query builder for these queries aren't exposed to the end user, this method opens up the API to build custom queries.

      Parameters

      • action: "insert"
      • client: QueryClientContract

      Returns InsertQueryBuilderContract<unknown[]>

    • Parameters

      • action: "delete" | "refresh" | "update"
      • client: QueryClientContract

      Returns ModelQueryBuilderContract<LucidModel>

    • Parameters

      • key: string
      • OptionaldefaultValue: any

      Returns OneOrMany<LucidRow> | null | undefined

    • Read/write realtionships. Following methods are intentionally loosely typed, so that one can bypass the public facing API and type checking for advanced use cases

      Parameters

      • key: string

      Returns boolean

    • Returns void

    • Parameters

      • key: string
      • result: OneOrMany<LucidRow> | null

      Returns void

    • Read/write attributes. Following methods are intentionally loosely typed, so that one can bypass the public facing API and type checking for advanced use cases

      Parameters

      • key: string
      • value: any

      Returns void

    • Parameters

      • Optionaloptions: ModelAdapterOptions

      Returns void

    • Parameters

      • key: string
      • result: OneOrMany<LucidRow> | null

      Returns void

    • Perform delete by issuing a delete request on the adapter

      Returns Promise<void>

    • Same as [[BaseModel.delete]] without invoking hooks

      Returns Promise<void>

    • Enable force update even when no attributes are dirty

      Returns this

    • Parameters

      • value: Partial<ModelAttributes<this>>
      • OptionalallowExtraProperties: boolean

      Returns this

    • Parameters

      • Optionalfields: "id" | "texto" | ("id" | "texto" | undefined)[]

      Returns boolean

    • The lockForUpdate method re-fetches the model instance from the database and locks the row to perform an update. The provided callback receives a fresh user instance and should use that to perform an update.

      Type Parameters

      • T

      Parameters

      • callback: (user: this) => T | Promise<T>

      Returns Promise<T>

    • Parameters

      • value: Partial<ModelAttributes<this>>
      • OptionalallowExtraProperties: boolean

      Returns this

    • Reload/Refresh the model instance

      Returns Promise<NominaTiposJornadas>

    • Returns related model for a given relationship

      Type Parameters

      • Name extends undefined

      Parameters

      Returns NonNullable<NominaTiposJornadas[Name]> extends ModelRelations<
          LucidModel,
          LucidModel,
      >
          ? (
              ModelRelations<LucidModel, LucidModel> & NominaTiposJornadas[Name] & {}
          )["client"]
          : never

    • Actions to perform on the instance

      Returns Promise<NominaTiposJornadas>

    • Perform save on the model without invoking hooks.

      Returns Promise<NominaTiposJornadas>

    • Serialize model to a plain object

      Parameters

      • OptionalcherryPick: CherryPick

      Returns ModelObject

    • Serialize attributes to a plain object

      Parameters

      • Optionalfields: CherryPickFields
      • Optionalraw: boolean

      Returns ModelObject

    • Serialize computed properties to a plain object

      Parameters

      • Optionalfields: CherryPickFields

      Returns ModelObject

    • Serialize relationships to key-value pair of model instances and their serializeAs keys

      Parameters

      • fields: undefined
      • raw: true

      Returns { [key: string]: LucidRow | LucidRow[] }

    • Serialize relationships to key-value pair of plain nested objects

      Parameters

      • cherryPick: { [relation: string]: CherryPick } | undefined
      • raw: false | undefined

      Returns ModelObject

    • Parameters

      • OptionalcherryPick: { [relation: string]: CherryPick }
      • Optionalraw: boolean

      Returns ModelObject

    • Serialize everything

      Returns ModelObject

    • Converts model to an object. It just returns the properties of the model, along with preloaded relationships

      Returns ModelObject

    • Parameters

      • connection: string

      Returns this

    • Parameters

      • trx: TransactionClientContract

      Returns this

    • Managing columns

      Parameters

      • name: string
      • options: Partial<ColumnOptions>

      Returns ColumnOptions

    • Managing computed columns

      Parameters

      • name: string
      • options: Partial<ComputedOptions>

      Returns ComputedOptions

    • Managing relationships

      Parameters

      • name: string
      • type: "hasOne" | "hasMany" | "belongsTo" | "manyToMany" | "hasManyThrough"
      • relatedModel: () => LucidModel
      • options: ModelRelationOptions

      Returns void

    • Creating model from adapter results

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • Optionalresult: ModelObject
      • OptionalsideloadAttributes: ModelObject
      • Optionaloptions: ModelAdapterOptions

      Returns InstanceType<T> | null

    • Creating multiple model instances from an array of adapter result

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • results: ModelObject[]
      • OptionalsideloadAttributes: ModelObject
      • Optionaloptions: ModelAdapterOptions

      Returns InstanceType<T>[]

    • Define a static property on the model using the inherit or define strategy.

      Inherit strategy will clone the property from the parent model and will set it on the current model

      Type Parameters

      • Model extends LucidModel
      • Prop extends string | number | symbol

      Parameters

      Returns void

    • Parameters

      • name: string

      Returns ModelColumnOptions | undefined

    • Parameters

      • name: string

      Returns ComputedOptions | undefined

    • Get relationship declaration

      Type Parameters

      • Model extends LucidModel
      • Name extends string | number | symbol

      Parameters

      Returns NonNullable<InstanceType<Model>[Name]> extends ModelRelations<
          LucidModel,
          LucidModel,
      >
          ? NonNullable<NonNullable<InstanceType<Model>[Name]>>["client"]["relation"]
          : RelationshipsContract

    • Type Parameters

      • Model extends LucidModel

      Parameters

      Returns RelationshipsContract

    • Parameters

      • name: string

      Returns boolean

    • Parameters

      • name: string

      Returns boolean

    • Find if a relationship exists

      Parameters

      • name: string

      Returns boolean

    • Register an after hook

      Type Parameters

      • Model extends LucidModel

      Parameters

      • this: Model
      • event: "fetch"
      • handler: HooksHandler<InstanceType<Model>[], "fetch">

      Returns void

    • Type Parameters

      • Model extends LucidModel

      Parameters

      • this: Model
      • event: "paginate"
      • handler: HooksHandler<ModelPaginatorContract<InstanceType<Model>>, "paginate">

      Returns void

    • Type Parameters

      • Model extends LucidModel
      • Event extends EventsList

      Parameters

      Returns void

    • Fetch all rows

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T>[]>

    • Register a before hook

      Type Parameters

      • Model extends LucidModel
      • Event extends "find" | "fetch"

      Parameters

      Returns void

    • Type Parameters

      • Model extends LucidModel

      Parameters

      • this: Model
      • event: "paginate"
      • handler: HooksHandler<
            [
                ModelQueryBuilderContract<Model, InstanceType<Model>>,
                ModelQueryBuilderContract<Model, InstanceType<Model>>,
            ],
            "paginate",
        >

      Returns void

    • Type Parameters

      • Model extends LucidModel
      • Event extends EventsList

      Parameters

      Returns void

    • Boot model

      Returns void

    • Create model and return its instance back

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • values: Partial<ModelAttributes<InstanceType<T>>>
      • Optionaloptions: ModelAssignOptions

      Returns Promise<InstanceType<T>>

    • Create many of model instances

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • values: Partial<ModelAttributes<InstanceType<T>>>[]
      • Optionaloptions: ModelAssignOptions

      Returns Promise<InstanceType<T>[]>

    • Same as [[BaseModel.createMany]] but without invoking hooks

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • values: Partial<ModelAttributes<InstanceType<T>>>[]
      • Optionaloptions: ModelAssignOptions

      Returns Promise<InstanceType<T>[]>

    • Same as [[BaseModel.create]] but without invoking hooks

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • values: Partial<ModelAttributes<InstanceType<T>>>
      • Optionaloptions: ModelAssignOptions

      Returns Promise<InstanceType<T>>

    • Find rows or create many when missing. One db call is invoked for each create

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • predicate:
            | keyof ModelAttributes<InstanceType<T>>
            | (keyof ModelAttributes<InstanceType<T>>)[]
      • payload: Partial<ModelAttributes<InstanceType<T>>>[]
      • Optionaloptions: ModelAssignOptions

      Returns Promise<InstanceType<T>[]>

    • Find rows or create in-memory instances of the missing one's.

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • predicate:
            | keyof ModelAttributes<InstanceType<T>>
            | (keyof ModelAttributes<InstanceType<T>>)[]
      • payload: Partial<ModelAttributes<InstanceType<T>>>[]
      • Optionaloptions: ModelAssignOptions

      Returns Promise<InstanceType<T>[]>

    • Find one using the primary key

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • value: any
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T> | null>

    • Find one using a clause

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • clause: Record<string, unknown>
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T> | null>

    • Find one using a key-value pair

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • key: string
      • value: any
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T> | null>

    • Find one using a clause or fail

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • clause: Record<string, unknown>
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T>>

    • Find one using a key-value pair or fail

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • key: string
      • value: any
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T>>

    • Find many using an array of primary keys

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • value: any[]
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T>[]>

    • Find multiple models instance using a clause

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • clause: Record<string, unknown>
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T>[]>

    • Find multiple models instance using a key/value pair

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • key: string
      • value: any
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T>[]>

    • Find one using the primary key or fail

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • value: any
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T>>

    • Same as query().first()

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T> | null>

    • Returns the first row or save it to the database

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • searchPayload: Partial<ModelAttributes<InstanceType<T>>>
      • OptionalsavePayload: Partial<ModelAttributes<InstanceType<T>>>
      • Optionaloptions: ModelAssignOptions

      Returns Promise<InstanceType<T>>

    • Same as query().firstOrFail()

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • Optionaloptions: ModelAdapterOptions

      Returns Promise<InstanceType<T>>

    • Returns the first row or create a new instance of model without persisting it

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • searchPayload: Partial<ModelAttributes<InstanceType<T>>>
      • OptionalsavePayload: Partial<ModelAttributes<InstanceType<T>>>
      • Optionaloptions: ModelAssignOptions

      Returns Promise<InstanceType<T>>

    • Returns the query for fetching a model instance

      Type Parameters

      • Model extends LucidModel
      • Result = InstanceType<Model>

      Parameters

      • this: Model
      • Optionaloptions: ModelAdapterOptions

      Returns ModelQueryBuilderContract<Model, Result>

    • Truncate model table

      Parameters

      • Optionalcascade: boolean

      Returns Promise<void>

    • Returns the first row or save it to the database

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • searchPayload: Partial<ModelAttributes<InstanceType<T>>>
      • updatePayload: Partial<ModelAttributes<InstanceType<T>>>
      • Optionaloptions: ModelAssignOptions

      Returns Promise<InstanceType<T>>

    • Update existing rows or create new one's.

      Type Parameters

      • T extends LucidModel

      Parameters

      • this: T
      • predicate:
            | keyof ModelAttributes<InstanceType<T>>
            | (keyof ModelAttributes<InstanceType<T>>)[]
      • payload: Partial<ModelAttributes<InstanceType<T>>>[]
      • Optionaloptions: ModelAssignOptions

      Returns Promise<InstanceType<T>[]>

    • Define an adapter to use for interacting with the database

      Parameters

      • adapter: AdapterContract

      Returns void