API
Schema
@rivyn/db / Schema
Class: Schema
Constructors
Constructor
new Schema(
definition,options?):Schema
Parameters
definition
options?
SchemaOptions = {}
Returns
Schema
Properties
timestamps
readonlytimestamps:boolean
Methods
indexPaths()
indexPaths():
object[]
Returns
object[]
prepareUpdate()
prepareUpdate(
update):Record<string,unknown>
Parameters
update
Record<string, unknown>
Returns
Record<string, unknown>
resolvePath()
resolvePath(
path):FieldDef|null
Parameters
path
string
Returns
FieldDef | null
toServerSpec()
toServerSpec():
ServerSchemaSpec
Returns
uniquePaths()
uniquePaths():
string[]
Returns
string[]
validateDoc()
validateDoc(
input):Record<string,unknown>
Parameters
input
unknown
Returns
Record<string, unknown>