Package openmw.queryΒΆ

openmw.query constructs queries that can be used in world.selectObjects and nearby.selectObjects.

Usage:

local query = require('openmw.query')

Type query

query.DOOR

Fields that can be used only when search for doors.

query.OBJECT

Fields that can be used with any object.

query.activators

Base Query to select activators.

query.actors

Base Query to select actors.

query.containers

Base Query to select containers.

query.doors

Base Query to select doors.

query.items

Base Query to select items.

Type CellFields

CellFields.isExterior
CellFields.name
CellFields.region

Type DOOR

DOOR.destCell
DOOR.isTeleport

Type Field

Field:eq(value)

Equal

Field:gt(value)

Greater

Field:gte(value)

Greater or equal

Field:lt(value)

Lesser

Field:lte(value)

Lesser or equal

Field:neq(value)

Not equal

Type OBJECT

OBJECT.cell
OBJECT.count
OBJECT.recordId
OBJECT.type

Type Query

Query:limit(maxCount)

Limit result size.

Query:where(condition)

Add condition.

Type query

Field(s)

#DOOR query.DOOR

Fields that can be used only when search for doors.

#OBJECT query.OBJECT

Fields that can be used with any object.

#Query query.activators

Base Query to select activators.

#Query query.actors

Base Query to select actors.

#Query query.containers

Base Query to select containers.

#Query query.doors

Base Query to select doors.

#Query query.items

Base Query to select items.

Type CellFields

Field(s)

#Field CellFields.isExterior
#Field CellFields.name
#Field CellFields.region

Type DOOR

Field(s)

#CellFields DOOR.destCell
#Field DOOR.isTeleport

Type Field

A field that can be used in a condition

Field(s)

Field:eq(value)

Equal

Parameter

  • value :

Field:gt(value)

Greater

Parameter

  • value :

Field:gte(value)

Greater or equal

Parameter

  • value :

Field:lt(value)

Lesser

Parameter

  • value :

Field:lte(value)

Lesser or equal

Parameter

  • value :

Field:neq(value)

Not equal

Parameter

  • value :

Type OBJECT

Field(s)

#CellFields OBJECT.cell
#Field OBJECT.count
#Field OBJECT.recordId
#Field OBJECT.type

Type Query

Query.

A Query itself can no return objects. It only holds search conditions.

Field(s)

Query:limit(maxCount)

Limit result size.

Parameter

  • #number maxCount :

Return value

#Query:

Query:where(condition)

Add condition.

Parameter

  • condition :

Return value

#Query: