Mixin: PropertyDescriptorWithDBOs

x2node-dbos. PropertyDescriptorWithDBOs

DBOs module specific PropertyDescriptor extension.

Members


<readonly> aggregatedPropPath :string

For an aggregate property, path of the aggregated collection property starting from the record type.
Type:
  • string

<readonly> aggregateFunc :string

For an aggregate property, the aggregation function, which may be "COUNT", "MAX", "MIN", "SUM" or "AVG".
Type:
  • string

<readonly> column :string

Name of the database column used to store the property value, or undefined if the property is calculated or a dependent rereference.
Type:
  • string

<readonly> fetchByDefault :boolean

true if the property is fetched by default (included in the fetch operation result when addressed with a wildcard pattern).
Type:
  • boolean

<readonly> generator :string|function

For a property, whose value is generated for new records, this is the generator, which can be a string "auto" (for automatically generated by the database), or a function that takes the database connection as its only argument, and returns either the id value or a promise of it. The property descriptor is made available to the generator function as this.
Type:
  • string | function

<readonly> indexColumn :string

For an array property, the name of the database column that contains the element indexes, or nothing if the array does not utilize any.
Type:
  • string

<readonly> keyColumn :string

For a map property that does not utilize keyPropertyName, the name of the database column that contains the map entry keys.
Type:
  • string

<readonly> parentIdColumn :string

If table property is present, this is the name of the column in that table that points back to the main record table.
Type:
  • string

<readonly> recordMetaInfoRole :string

For a record meta-info property this is the property role, which can be one of the following: "version", "creationTimestamp", "creationActor", "modificationTimestamp" or "modificationActor".
Type:
  • string

<readonly> reverseRefPropertyName :string

For a dependent record reference property, name of the property in the target record type that refers back to this record type. A dependent record reference property can only appear among the top record type properties (not in a nested object).
Type:
  • string

<readonly> table :string

Name of the database table used to store the property value, or undefined if the property is calculated, a dependent rereference or stored in the main record table.
Type:
  • string

<readonly> tableUnique :boolean

For an id property (isId() returns true), tells if the id value is unique table-wide.
Type:
  • boolean

Methods


isAggregate()

Tell if this is an aggregate property. If a property is an aggregate, isCalculated() also returns true and aggregatedPropPath and aggregateFunc descriptor properties are made available as well.
Returns:
true if aggregate property.
Type
boolean

isEntangled()

Tell if the stored reference property is entangled with a stored reference property of its target record type (they share the same link table).
Returns:
true if entangled reference property.
Type
boolean

isFiltered()

Tell if filtered collection view property.
Returns:
true if filtered property.
Type
boolean

isOrdered()

Tell if ordered collection property.
Returns:
true if ordered property.
Type
boolean

isWeakDependency()

For a dependent record reference property (one that has reverseRefPropertyName descriptor property), tell if the dependency is weak. A weak dependency means that when the referring record is being deleted, no attempt is made to cascade the deletion to the referred record(s). Strongly dependent records, on the other hand, are automatically deleted when the referring record is deleted (the deletion operation is cascaded over the strong dependencies).
Returns:
true if weak dependency.
Type
boolean