Hierarchy

Implemented by

Methods

  • BaseFilesPath returns the storage dir path used by the collection.

    Returns string

  • DecodeOptions decodes the current collection options into the provided "result" (must be a pointer).

    Parameters

    • result: any

    Returns void

  • GetId returns the model id.

    Returns string

  • HasId returns whether the model has a nonzero id.

    Returns boolean

  • IsAuth checks if the current collection has "auth" type.

    Returns boolean

  • IsBase checks if the current collection has "base" type.

    Returns boolean

  • IsNew indicates what type of db query (insert or update) should be used with the model instance.

    Returns boolean

  • IsView checks if the current collection has "view" type.

    Returns boolean

  • MarkAsNew marks the model as "new" (aka. enforces m.IsNew() to be true).

    Returns void

  • MarkAsNotNew marks the model as "not new" (aka. enforces m.IsNew() to be false)

    Returns void

  • MarshalJSON implements the [json.Marshaler] interface.

    Returns string | number[]

  • NormalizeOptions updates the current collection options with a new normalized state based on the collection type.

    Returns void

  • PostScan implements the [dbx.PostScanner] interface.

    It is executed right after the model was populated with the db row values.

    Returns void

  • RefreshCreated updates the model Created field with the current datetime.

    Returns void

  • RefreshId generates and sets a new model id.

    The generated id is a cryptographically random 15 characters length string.

    Returns void

  • RefreshUpdated updates the model Updated field with the current datetime.

    Returns void

  • SetId sets the model id to the provided string value.

    Parameters

    • id: string

    Returns void

  • SetOptions normalizes and unmarshals the specified options into m.Options.

    Parameters

    • typedOptions: any

    Returns void

  • TableName returns the Collection model SQL table name.

    Returns string

Properties

createRule?: string
created: types.DateTime
deleteRule?: string
id: string
indexes: JsonArray<string>
listRule?: string

rules

name: string
options: JsonMap
schema: schema.Schema
system: boolean
type: string
updateRule?: string
updated: types.DateTime
viewRule?: string

Generated using TypeDoc