/** Whether or not the db should create a fulltext index on this field */
asyncfullTextSearchEnabled():Promise<boolean>{
returnfalse;
}
/** Whether or not a field has a default value - that is, a value
* given to the field if no value is provided */
hasDefaultValue(){
returntrue;
}
/** The default value that will be assigned to the field if no
* value is given */
asyncgetDefaultValue(
_:Context
):Promise<Parameters<this["encode"]>[1]|null>{
returnnull;
}
/** Whether or not any of the methods of the field depend on the
* previous value of the field */
isOldValueSensitive(_:ActionName){
returnfalse;
}
/** Used to signal a positive decision from within {@link
* Field.isProperValue}. */
staticvalid():ValidationResult{
return{valid:true};
}
/** Used to signal a negative decition from within {@link
* Field.isProperValue}. */
staticinvalid(reason:string):ValidationResult{
return{valid:false,reason};
}
/** Runs when the app is being started. Hooks can be set up within
* this function */
asyncinit(app:App):Promise<void>{
this.app=app;
}
asyncgetAttachments(
context:Context,
values:any[],// this method gets called once for multiple resources, to limit the number of queries. Field values of all the resources are passed in this array
attachment_options:any
):Promise<ItemListResult<any>>{
if(attachment_options!==undefined){
thrownewBadSubjectAction(
`Field '${this.name}' does not support attachments`
);
}
returnnewItemListResult([],[],{});
}
/** Creates parts of a Mongo Pipieline that will be used to filter