UNPKG

dobo

Version:

DBMS for Bajo Framework

1 lines 48.5 kB
{"list":[{"title":"Dobo","link":"<a href=\"Dobo.html\">Dobo</a>"},{"title":"Dobo#adapters","link":"<a href=\"Dobo.html#adapters\">adapters</a>"},{"title":"Dobo#connections","link":"<a href=\"Dobo.html#connections\">connections</a>"},{"title":"Dobo#features","link":"<a href=\"Dobo.html#features\">features</a>"},{"title":"Dobo#getAdapter","link":"<a href=\"Dobo.html#getAdapter\">getAdapter</a>","description":"<p>Get adapter by name. It returns the first adapter named after &quot;{name}&quot;</p>\n<p>Also support NsPath format for those who load the same named adapter but from different provider/plugin.</p>"},{"title":"Dobo#getAllPropertyKeys","link":"<a href=\"Dobo.html#getAllPropertyKeys\">getAllPropertyKeys</a>","description":"<p>Get all allowed property keys</p>"},{"title":"Dobo#getConnection","link":"<a href=\"Dobo.html#getConnection\">getConnection</a>","description":"<p>Get connection by name. It returns the first connection named after &quot;{name}&quot;</p>"},{"title":"Dobo#getFeature","link":"<a href=\"Dobo.html#getFeature\">getFeature</a>","description":"<p>Get feature by name. It returns the first adapter named after &quot;{name}&quot;</p>\n<p>Also support NsPath format for those who load the same named adapter but from different provider/plugin.</p>"},{"title":"Dobo#getModel","link":"<a href=\"Dobo.html#getModel\">getModel</a>","description":"<p>Get model by name</p>"},{"title":"Dobo#getModelsByConnection","link":"<a href=\"Dobo.html#getModelsByConnection\">getModelsByConnection</a>","description":"<p>Get all models that bound to connection <code>name</code></p>"},{"title":"Dobo#getPropertyKeysByType","link":"<a href=\"Dobo.html#getPropertyKeysByType\">getPropertyKeysByType</a>","description":"<p>Get allowed property keys by field type</p>"},{"title":"Dobo#init","link":"<a href=\"Dobo.html#init\">init</a>","description":"<p>Initialize plugin and performing the following tasks:</p>\n<ul>\n<li>{@link module:Lib.collectAdapters|Collecting all adapters}</li>\n<li>{@link module:Lib.collectConnections|Collecting all connections}</li>\n<li>{@link module:Lib.collectFeatures|Collecting all features}</li>\n<li>{@link module:Lib.collectModels|Collecting all models}</li>\n</ul>"},{"title":"Dobo#models","link":"<a href=\"Dobo.html#models\">models</a>"},{"title":"Dobo#start","link":"<a href=\"Dobo.html#start\">start</a>","description":"<p>Start plugin</p>"},{"title":"Dobo.aggregateTypes","link":"<a href=\"Dobo.html#.aggregateTypes\">aggregateTypes</a>"},{"title":"Dobo.histogramTypes","link":"<a href=\"Dobo.html#.histogramTypes\">histogramTypes</a>"},{"title":"Dobo.idTypes","link":"<a href=\"Dobo.html#.idTypes\">idTypes</a>"},{"title":"Dobo.indexTypes","link":"<a href=\"Dobo.html#.indexTypes\">indexTypes</a>"},{"title":"Dobo.propertyType","link":"<a href=\"Dobo.html#.propertyType\">propertyType</a>"},{"title":"Dobo.sanitizeDate","link":"<a href=\"Dobo.html#.sanitizeDate\">sanitizeDate</a>","description":"<p>Sanitize value as a date/time value. Parse/format string using {@link https://day.js.org/docs/en/display/format|dayjs format}</p>"},{"title":"DoboAction","link":"<a href=\"DoboAction.html\">DoboAction</a>"},{"title":"DoboAction#_setArgs","link":"<a href=\"DoboAction.html#_setArgs\">_setArgs</a>","description":"<p>Internal method to set the arguments to the instance properties based on the method name\nand the arguments passed.</p>"},{"title":"DoboAction#body","link":"<a href=\"DoboAction.html#body\">body</a>","description":"<p>Set the body for the corresponding record. You need this for <code>createRecord</code>, <code>updateRecord</code>\nor <code>upsertRecord</code> operations. This method is chainable.</p>"},{"title":"DoboAction#dispose","link":"<a href=\"DoboAction.html#dispose\">dispose</a>","description":"<p>Dispose the instance and clean up resources.</p>"},{"title":"DoboAction#filter","link":"<a href=\"DoboAction.html#filter\">filter</a>","description":"<p>Set the filter for the corresponding record. You optionally need this for <code>findRecord</code>,\n<code>findOneRecord</code> or <code>findAllRecord</code> operations. This method is chainable.</p>"},{"title":"DoboAction#id","link":"<a href=\"DoboAction.html#id\">id</a>","description":"<p>Set the ID for the corresponding record. You need this for <code>updateRecord</code> or <code>removeRecord</code>\noperations. This method is chainable.</p>"},{"title":"DoboAction#options","link":"<a href=\"DoboAction.html#options\">options</a>","description":"<p>Set the options for the corresponding method. This method is chainable.</p>"},{"title":"DoboAction#run","link":"<a href=\"DoboAction.html#run\">run</a>","description":"<p>Execute the corresponding method with the set arguments and options. This method is chainable.</p>"},{"title":"DoboAction.TMethods","link":"<a href=\"DoboAction.html#.TMethods\">TMethods</a>","description":"<p>Dobo model's chainable methods. Only the keys listed here are allowed to be called in chainable methods.\nThe values are the only allowed arguments for the corresponding chainable methods.</p>"},{"title":"DoboAction.TOptions","link":"<a href=\"DoboAction.html#.TOptions\">TOptions</a>","description":"<p>Allowed options for Dobo model's chainable methods. Only the keys listed here are allowed to be called\nin chainable methods. The values are the default values for the corresponding options.</p>"},{"title":"DoboAdapter","link":"<a href=\"DoboAdapter.html\">DoboAdapter</a>","description":"<p>Constructor.</p>"},{"title":"DoboAdapter#_attachHook","link":"<a href=\"DoboAdapter.html#_attachHook\">_attachHook</a>","description":"<p>Attaches hooks to the model for various operations. It runs the appropriate hooks\nbefore and after the specified operation, allowing for custom behavior to be injected\ninto the model's lifecycle.</p>"},{"title":"DoboAdapter#_buildModel","link":"<a href=\"DoboAdapter.html#_buildModel\">_buildModel</a>","description":"<p>Wrapper for the <code>buildModel</code> method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_bulkCreateRecord","link":"<a href=\"DoboAdapter.html#_bulkCreateRecord\">_bulkCreateRecord</a>","description":"<p>Wrapper for the {@link DoboAdapter#bulkCreateRecord} method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_checkUnique","link":"<a href=\"DoboAdapter.html#_checkUnique\">_checkUnique</a>","description":"<p>Checks the uniqueness of fields with a unique index.</p>"},{"title":"DoboAdapter#_clearRecord","link":"<a href=\"DoboAdapter.html#_clearRecord\">_clearRecord</a>","description":"<p>Wrapper for the {@link DoboAdapter#clearRecord} method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_countRecord","link":"<a href=\"DoboAdapter.html#_countRecord\">_countRecord</a>","description":"<p>Wrapper for the {@link DoboAdapter#countRecord} method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_createAggregate","link":"<a href=\"DoboAdapter.html#_createAggregate\">_createAggregate</a>","description":"<p>Wrapper for the {@link DoboAdapter#createAggregate} method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_createHistogram","link":"<a href=\"DoboAdapter.html#_createHistogram\">_createHistogram</a>","description":"<p>Wrapper for the {@link DoboAdapter#createHistogram} method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_createRecord","link":"<a href=\"DoboAdapter.html#_createRecord\">_createRecord</a>","description":"<p>Wrapper for the {@link DoboAdapter#createRecord} method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_dropModel","link":"<a href=\"DoboAdapter.html#_dropModel\">_dropModel</a>","description":"<p>Wrapper for the <code>dropModel</code> method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_findAllRecord","link":"<a href=\"DoboAdapter.html#_findAllRecord\">_findAllRecord</a>","description":"<p>Finds all records for the given model based on the provided filter.\nThis method will only run if child adapter does not implement {@link DoboAdapter#findAllRecord}.</p>"},{"title":"DoboAdapter#_findRecord","link":"<a href=\"DoboAdapter.html#_findRecord\">_findRecord</a>","description":"<p>Wrapper for the {@link DoboAdapter#findRecord} method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_getRecord","link":"<a href=\"DoboAdapter.html#_getRecord\">_getRecord</a>","description":"<p>Wrapper for the {@link DoboAdapter#getRecord} method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_getReturningFields","link":"<a href=\"DoboAdapter.html#_getReturningFields\">_getReturningFields</a>","description":"<p>Get returning fields for a model based on the provided options. If the adapter supports returning fields,\nit will return the specified fields or all model properties. It ensures that the ID field is always\nincluded in the returned fields.</p>"},{"title":"DoboAdapter#_modelExists","link":"<a href=\"DoboAdapter.html#_modelExists\">_modelExists</a>","description":"<p>Wrapper for the <code>modelExists</code> method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_prepBodyForCreate","link":"<a href=\"DoboAdapter.html#_prepBodyForCreate\">_prepBodyForCreate</a>","description":"<p>Prepares the body of a record for creation by populating default values for properties\nthat are not set. It handles various types of default values, including functions,\nspecial strings (like 'now', 'uuid', etc.), and static values.</p>"},{"title":"DoboAdapter#_prepIdForCreate","link":"<a href=\"DoboAdapter.html#_prepIdForCreate\">_prepIdForCreate</a>","description":"<p>Prepares the ID for a record before creation. It generates an ID if it is not set in the body.</p>"},{"title":"DoboAdapter#_removeRecord","link":"<a href=\"DoboAdapter.html#_removeRecord\">_removeRecord</a>","description":"<p>Wrapper for the {@link DoboAdapter#removeRecord} method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_updateRecord","link":"<a href=\"DoboAdapter.html#_updateRecord\">_updateRecord</a>","description":"<p>Wrapper for the {@link DoboAdapter#updateRecord} method, called internally by <code>model</code> to make sure\nall adapter hooks are executed accordingly, and all inputs and outputs are sanitized.</p>"},{"title":"DoboAdapter#_upsertRecord","link":"<a href=\"DoboAdapter.html#_upsertRecord\">_upsertRecord</a>","description":"<p>Upserts a record for the given model.\nThis method will only run if child adapter does not implement {@link DoboAdapter#upsertRecord}.</p>"},{"title":"DoboAdapter#buildModel","link":"<a href=\"DoboAdapter.html#buildModel\">buildModel</a>","description":"<p>Builds the model in the database.</p>\n<p>Must be implemented by child classes to provide specific database functionality for model building,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#bulkCreateRecord","link":"<a href=\"DoboAdapter.html#bulkCreateRecord\">bulkCreateRecord</a>","description":"<p>Bulk creates records for the given model.</p>\n<p>Must be implemented by child classes to provide specific database functionality for bulk record creation,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#clearRecord","link":"<a href=\"DoboAdapter.html#clearRecord\">clearRecord</a>","description":"<p>Clears all records for the given model.</p>\n<p>Must be implemented by child classes to provide specific database functionality for record clearing,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#connect","link":"<a href=\"DoboAdapter.html#connect\">connect</a>","description":"<p>Connects to the database using the provided connection parameters.</p>"},{"title":"DoboAdapter#countRecord","link":"<a href=\"DoboAdapter.html#countRecord\">countRecord</a>","description":"<p>Counts the records for the given model based on the provided filter.</p>\n<p>Must be implemented by child classes to provide specific database functionality for record counting,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#createAggregate","link":"<a href=\"DoboAdapter.html#createAggregate\">createAggregate</a>","description":"<p>Creates an aggregate for the given model based on the provided filter and parameters.</p>\n<p>Must be implemented by child classes to provide specific database functionality for aggregate creation,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#createHistogram","link":"<a href=\"DoboAdapter.html#createHistogram\">createHistogram</a>","description":"<p>Creates a histogram for the given model based on the provided filter and parameters.</p>\n<p>Must be implemented by child classes to provide specific database functionality for histogram creation,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#createRecord","link":"<a href=\"DoboAdapter.html#createRecord\">createRecord</a>","description":"<p>Creates a new record for the given model.</p>\n<p>Must be implemented by child classes to provide specific database functionality for record creation,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#dispose","link":"<a href=\"DoboAdapter.html#dispose\">dispose</a>","description":"<p>Disposes of the adapter, performing any necessary cleanup operations.</p>"},{"title":"DoboAdapter#dropModel","link":"<a href=\"DoboAdapter.html#dropModel\">dropModel</a>","description":"<p>Drops the model from the database.</p>\n<p>Must be implemented by child classes to provide specific database functionality for dropping a model,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#findRecord","link":"<a href=\"DoboAdapter.html#findRecord\">findRecord</a>","description":"<p>Finds records for the given model based on the provided filter.</p>\n<p>Must be implemented by child classes to provide specific database functionality for record finding,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#getRealFields","link":"<a href=\"DoboAdapter.html#getRealFields\">getRealFields</a>","description":"<p>Utility method to get the real fields of a model, excluding virtual fields.\nThis is useful for operations that require only the actual stored properties of a model.</p>"},{"title":"DoboAdapter#getRecord","link":"<a href=\"DoboAdapter.html#getRecord\">getRecord</a>","description":"<p>Retrieves a record for the given model by its ID.</p>\n<p>Must be implemented by child classes to provide specific database functionality for record retrieval,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#getVirtualFields","link":"<a href=\"DoboAdapter.html#getVirtualFields\">getVirtualFields</a>","description":"<p>Utility method to get the virtual fields of a model.\nThis is useful for operations that need to work with computed or derived properties.</p>"},{"title":"DoboAdapter#idField","link":"<a href=\"DoboAdapter.html#idField\">idField</a>","description":"<p>ID field configuration</p>"},{"title":"DoboAdapter#maxChunkSize","link":"<a href=\"DoboAdapter.html#maxChunkSize\">maxChunkSize</a>","description":"<p>Maximum chunk size for bulk operations</p>"},{"title":"DoboAdapter#memory","link":"<a href=\"DoboAdapter.html#memory\">memory</a>","description":"<p>Indicates whether the adapter uses in-memory storage</p>"},{"title":"DoboAdapter#modelExists","link":"<a href=\"DoboAdapter.html#modelExists\">modelExists</a>","description":"<p>Checks if the model exists in the database.</p>\n<p>Must be implemented by child classes to provide specific database functionality for model existence checking,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#name","link":"<a href=\"DoboAdapter.html#name\">name</a>","description":"<p>Adapter name</p>"},{"title":"DoboAdapter#options","link":"<a href=\"DoboAdapter.html#options\">options</a>","description":"<p>Adapter options</p>"},{"title":"DoboAdapter#removeRecord","link":"<a href=\"DoboAdapter.html#removeRecord\">removeRecord</a>","description":"<p>Removes a record for the given model by its ID.</p>\n<p>Must be implemented by child classes to provide specific database functionality for record removal,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#sanitizeBody","link":"<a href=\"DoboAdapter.html#sanitizeBody\">sanitizeBody</a>","description":"<p>Sanitizes the body of a record before creating or updating it. It ensures that all required fields\nare present and have valid values, and converts data types as necessary.</p>"},{"title":"DoboAdapter#sanitizeConnection","link":"<a href=\"DoboAdapter.html#sanitizeConnection\">sanitizeConnection</a>","description":"<p>Sanitize connection object</p>"},{"title":"DoboAdapter#sanitizeRecord","link":"<a href=\"DoboAdapter.html#sanitizeRecord\">sanitizeRecord</a>","description":"<p>Sanitizes a record retrieved from the database, converting data types as necessary\nand ensuring that the record conforms to the model's schema.</p>"},{"title":"DoboAdapter#support","link":"<a href=\"DoboAdapter.html#support\">support</a>","description":"<p>Support configuration for the adapter</p>"},{"title":"DoboAdapter#transaction","link":"<a href=\"DoboAdapter.html#transaction\">transaction</a>","description":"<p>Executes a transaction for the given model.</p>\n<p>Must be implemented by child classes to provide specific database functionality for transactions,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#updateRecord","link":"<a href=\"DoboAdapter.html#updateRecord\">updateRecord</a>","description":"<p>Updates a record for the given model by its ID.</p>\n<p>Must be implemented by child classes to provide specific database functionality for record updating,\nor throw an error if the operation is not supported by the adapter.</p>"},{"title":"DoboAdapter#useUtc","link":"<a href=\"DoboAdapter.html#useUtc\">useUtc</a>","description":"<p>Indicates whether to use UTC for datetime fields</p>"},{"title":"DoboAdapter.TIdField","link":"<a href=\"DoboAdapter.html#.TIdField\">TIdField</a>"},{"title":"DoboAdapter.TSupport","link":"<a href=\"DoboAdapter.html#.TSupport\">TSupport</a>"},{"title":"DoboConnection","link":"<a href=\"DoboConnection.html\">DoboConnection</a>"},{"title":"DoboConnection#adapter","link":"<a href=\"DoboConnection.html#adapter\">adapter</a>","description":"<p>Adapter object</p>"},{"title":"DoboConnection#client","link":"<a href=\"DoboConnection.html#client\">client</a>","description":"<p>Client instance</p>"},{"title":"DoboConnection#connect","link":"<a href=\"DoboConnection.html#connect\">connect</a>","description":"<p>Establish this connection through the adapter to the actual database system. Adapter developer must\nprovide a method named <code>connect()</code> to connect the underlying database and (optionally)\nreturn its client instance.</p>"},{"title":"DoboConnection#dispose","link":"<a href=\"DoboConnection.html#dispose\">dispose</a>","description":"<p>Dispose this connection</p>"},{"title":"DoboConnection#initAdapter","link":"<a href=\"DoboConnection.html#initAdapter\">initAdapter</a>","description":"<p>Initialize the adapter for this connection. If the adapter is already an instance of <code>DoboAdapter</code>,\nit will be used directly. Otherwise, it will be retrieved from the plugin's adapter registry\nand sanitized with the connection options.</p>"},{"title":"DoboConnection#name","link":"<a href=\"DoboConnection.html#name\">name</a>","description":"<p>Connection name</p>"},{"title":"DoboConnection#options","link":"<a href=\"DoboConnection.html#options\">options</a>","description":"<p>Connection options</p>"},{"title":"DoboConnection.TOptions","link":"<a href=\"DoboConnection.html#.TOptions\">TOptions</a>"},{"title":"DoboFeature","link":"<a href=\"DoboFeature.html\">DoboFeature</a>","description":"<p>Constructor.</p>"},{"title":"DoboFeature#dispose","link":"<a href=\"DoboFeature.html#dispose\">dispose</a>","description":"<p>Dispose the instance and clean up resources.</p>"},{"title":"DoboFeature#handler","link":"<a href=\"DoboFeature.html#handler\">handler</a>","description":"<p>Feature handler function.</p>"},{"title":"DoboFeature#name","link":"<a href=\"DoboFeature.html#name\">name</a>","description":"<p>Feature name</p>"},{"title":"DoboModel","link":"<a href=\"DoboModel.html\">DoboModel</a>","description":"<p>Constructor</p>"},{"title":"DoboModel#adapter","link":"<a href=\"DoboModel.html#adapter\">adapter</a>","description":"<p>Model's adapter name</p>"},{"title":"DoboModel.TFilter","link":"<a href=\"DoboModel.html#.TFilter\">TFilter</a>"},{"title":"DoboModel.TOptions","link":"<a href=\"DoboModel.html#.TOptions\">TOptions</a>"},{"title":"DoboModel.TPagination","link":"<a href=\"DoboModel.html#.TPagination\">TPagination</a>"},{"title":"DoboModel.TPropertyType","link":"<a href=\"DoboModel.html#.TPropertyType\">TPropertyType</a>"},{"title":"DoboModel.TPropertyValue","link":"<a href=\"DoboModel.html#.TPropertyValue\">TPropertyValue</a>","description":"<p>Property value type definition. Used for building property <code>values</code> in a model which is an array of this object type.</p>"},{"title":"DoboModel.TRecord","link":"<a href=\"DoboModel.html#.TRecord\">TRecord</a>","description":"<p>The record returned from a model's action. It is an object where:</p>\n<ul>\n<li>Key represents the property name</li>\n<li>Value represents its value according to the property's data type</li>\n</ul>\n<p>This record is then merged with {@link DoboModel.TRecordFormatted} and {@link DoboModel.TRecordRef} to form the final record returned from a model's action.</p>"},{"title":"DoboModel.TRecordFormatted","link":"<a href=\"DoboModel.html#.TRecordFormatted\">TRecordFormatted</a>","description":"<p>Formatted version of a record's property values. It is an object where:</p>\n<ul>\n<li>Key represents the property name</li>\n<li>Value represents its formatted value according to the property's data type or formatting function. Data type is ALWAYS in string.</li>\n</ul>\n<p>This record is then wrapped in a <code>_fmt</code> property.</p>"},{"title":"DoboModel.TRecordRef","link":"<a href=\"DoboModel.html#.TRecordRef\">TRecordRef</a>","description":"<p>Reference record related to a record's result. It is an object where:</p>\n<ul>\n<li>Key represents the name of the referenced record. Normally, it is the referenced model's name in camelCase format.</li>\n<li>Value represents its reference record. It can be an object or an array of objects, depending on the relationship type.</li>\n</ul>\n<p>This record is then wrapped in a <code>_ref</code> property in the result object.</p>"},{"title":"DoboModel.TResultCreateRecord","link":"<a href=\"DoboModel.html#.TResultCreateRecord\">TResultCreateRecord</a>","description":"<p>The result returned from a model's <code>createRecord</code> action if <code>dataOnly</code> is set to <code>false</code>.</p>"},{"title":"DoboModel.TResultFindRecord","link":"<a href=\"DoboModel.html#.TResultFindRecord\">TResultFindRecord</a>","description":"<p>The result returned from a model's <code>find*</code> actions if <code>dataOnly</code> is set to <code>false</code>.</p>"},{"title":"DoboModel.TResultGetRecord","link":"<a href=\"DoboModel.html#.TResultGetRecord\">TResultGetRecord</a>","description":"<p>The result returned from a model's <code>getRecord</code> action if <code>dataOnly</code> is set to <code>false</code>.</p>"},{"title":"DoboModel.TResultRecord","link":"<a href=\"DoboModel.html#.TResultRecord\">TResultRecord</a>","description":"<p>The result returned from a model's action other than <code>find*</code>, <code>{create|update|remove}Record</code> if <code>dataOnly</code> is set to <code>false</code>.</p>"},{"title":"DoboModel.TResultRemoveRecord","link":"<a href=\"DoboModel.html#.TResultRemoveRecord\">TResultRemoveRecord</a>","description":"<p>The result returned from a model's <code>removeRecord</code> action if <code>dataOnly</code> is set to <code>false</code>.</p>"},{"title":"DoboModel.TResultUpdateRecord","link":"<a href=\"DoboModel.html#.TResultUpdateRecord\">TResultUpdateRecord</a>","description":"<p>The result returned from a model's <code>updateRecord</code> action if <code>dataOnly</code> is set to <code>false</code>.</p>"},{"title":"DoboModel.TSort","link":"<a href=\"DoboModel.html#.TSort\">TSort</a>","description":"<p>Key value pairs used as sort order in pagination and sorting of records. It is an object where:</p>\n<ul>\n<li>Key represents model's field name</li>\n<li>Value represents its sort order</li>\n</ul>"},{"title":"DoboModel.TSortOrder","link":"<a href=\"DoboModel.html#.TSortOrder\">TSortOrder</a>","description":"<p>Sort order key used in pagination and sorting of records. It can be either:</p>\n<ul>\n<li><code>1</code> for ascending order (the default, if none is provided) or</li>\n<li><code>-1</code> for descending order.</li>\n</ul>"},{"title":"DoboModel.TValidator","link":"<a href=\"DoboModel.html#.TValidator\">TValidator</a>","description":"<p>All available validators to check against model's properties and rules</p>"},{"title":"DoboModel.TValidatorArray","link":"<a href=\"DoboModel.html#.TValidatorArray\">TValidatorArray</a>","description":"<p>List of available array validators to check against model's properties and rules</p>"},{"title":"DoboModel.TValidatorBoolean","link":"<a href=\"DoboModel.html#.TValidatorBoolean\">TValidatorBoolean</a>","description":"<p>List of available boolean validators to check against model's properties and rules</p>"},{"title":"DoboModel.TValidatorDate","link":"<a href=\"DoboModel.html#.TValidatorDate\">TValidatorDate</a>","description":"<p>List of available date validators to check against model's properties and rules</p>"},{"title":"DoboModel.TValidatorNumber","link":"<a href=\"DoboModel.html#.TValidatorNumber\">TValidatorNumber</a>","description":"<p>List of available number validators to check against model's properties and rules</p>"},{"title":"DoboModel.TValidatorString","link":"<a href=\"DoboModel.html#.TValidatorString\">TValidatorString</a>","description":"<p>List of available string validators to check against model's properties and rules</p>"},{"title":"DoboModel.TValidatorTimestamp","link":"<a href=\"DoboModel.html#.TValidatorTimestamp\">TValidatorTimestamp</a>","description":"<p>List of available timestamp validators to check against model's properties and rules</p>"},{"title":"DoboModel._simpleLookup","link":"<a href=\"DoboModel.html#._simpleLookup\">_simpleLookup</a>","description":"<p>Internal method to perform a simple lookup based on the provided value and lookupValue.</p>"},{"title":"DoboModel.action","link":"<a href=\"DoboModel.html#.action\">action</a>","description":"<p>Invoke a model's action. It will create a new instance of {@link DoboAction} and return it.</p>"},{"title":"DoboModel.build","link":"<a href=\"DoboModel.html#.build\">build</a>","description":"<p>Build a model's definition based on its properties and rules.</p>"},{"title":"DoboModel.buildFromDbModel","link":"<a href=\"DoboModel.html#.buildFromDbModel\">buildFromDbModel</a>","description":"<p>Build JOI model from database model's properties and rules</p>"},{"title":"DoboModel.buildPropValues","link":"<a href=\"DoboModel.html#.buildPropValues\">buildPropValues</a>","description":"<p>Builds the values for a given property if <code>prop.values</code> is set:</p>\n<ul>\n<li>If a string, it will be treated as a handler and executed to get the values.</li>\n<li>If a function, it will be executed to get the values.</li>\n<li>If an array, it will be used as is.</li>\n</ul>\n<p>Values are returned as an array of {@link DoboModel.TPropertyValues}.\nIf a request object is provided in the options, the <code>text</code> will be translated using\nthe request's translation function.</p>"},{"title":"DoboModel.clearRecord","link":"<a href=\"DoboModel.html#.clearRecord\">clearRecord</a>","description":"<p>Clears all records from the model's underlying data store.</p>\n<p>If no arguments are provided, it automatically turns into a chainable {@link DoboAction} object.</p>"},{"title":"DoboModel.countRecord","link":"<a href=\"DoboModel.html#.countRecord\">countRecord</a>","description":"<p>Counts the number of records in the model's underlying data store that match the provided filter criteria.</p>\n<p>If no arguments are provided, it automatically turns into a chainable {@link DoboAction} object.</p>"},{"title":"DoboModel.createRecord","link":"<a href=\"DoboModel.html#.createRecord\">createRecord</a>","description":"<p>Creates a new record in the model's underlying data store with the provided data.</p>\n<p>If no arguments are provided, it automatically turns into a chainable {@link DoboAction} object.</p>"},{"title":"DoboModel.drop","link":"<a href=\"DoboModel.html#.drop\">drop</a>","description":"<p>Drops the model from the underlying data store.</p>"},{"title":"DoboModel.findAllRecord","link":"<a href=\"DoboModel.html#.findAllRecord\">findAllRecord</a>","description":"<p>Finds all records from the model's underlying data store based on the provided filter.</p>"},{"title":"DoboModel.findOneRecord","link":"<a href=\"DoboModel.html#.findOneRecord\">findOneRecord</a>","description":"<p>Finds a single record from the model's underlying data store based on the provided filter.</p>\n<p>If no arguments are provided, it automatically turns into a chainable {@link DoboAction} object.</p>"},{"title":"DoboModel.findRecord","link":"<a href=\"DoboModel.html#.findRecord\">findRecord</a>","description":"<p>Finds records in the model's underlying data store that match the provided filter criteria.</p>\n<p>If no arguments are provided, it automatically turns into a chainable {@link DoboAction} object.</p>"},{"title":"DoboModel.getIndexes","link":"<a href=\"DoboModel.html#.getIndexes\">getIndexes</a>","description":"<p>Returns the model's indexes.</p>"},{"title":"DoboModel.getNonVirtualProperties","link":"<a href=\"DoboModel.html#.getNonVirtualProperties\">getNonVirtualProperties</a>","description":"<p>Get the model's non-virtual properties.</p>"},{"title":"DoboModel.getProperties","link":"<a href=\"DoboModel.html#.getProperties\">getProperties</a>","description":"<p>Get the model's properties based on the given options.</p>"},{"title":"DoboModel.getProperty","link":"<a href=\"DoboModel.html#.getProperty\">getProperty</a>","description":"<p>Get a property by its name.</p>"},{"title":"DoboModel.getRecord","link":"<a href=\"DoboModel.html#.getRecord\">getRecord</a>","description":"<p>Gets a record from the model's underlying data store based on the provided ID.</p>\n<p>If no arguments are provided, it automatically turns into a chainable {@link DoboAction} object.</p>"},{"title":"DoboModel.getVirtualProperties","link":"<a href=\"DoboModel.html#.getVirtualProperties\">getVirtualProperties</a>","description":"<p>Get the model's virtual properties.</p>"},{"title":"DoboModel.hasProperty","link":"<a href=\"DoboModel.html#.hasProperty\">hasProperty</a>","description":"<p>Checks if the model has a property with the given name.</p>"},{"title":"DoboModel.isExists","link":"<a href=\"DoboModel.html#.isExists\">isExists</a>","description":"<p>Checks if the model exists in the underlying data store.</p>"},{"title":"DoboModel.removeRecord","link":"<a href=\"DoboModel.html#.removeRecord\">removeRecord</a>","description":"<p>Removes a record from the model's underlying data store based on the provided ID.</p>\n<p>If no arguments are provided, it automatically turns into a chainable {@link DoboAction} object.</p>"},{"title":"DoboModel.sanitizeBody","link":"<a href=\"DoboModel.html#.sanitizeBody\">sanitizeBody</a>","description":"<p>Sanitize the payload body based on the model's properties and rules.</p>"},{"title":"DoboModel.sanitizeFixture","link":"<a href=\"DoboModel.html#.sanitizeFixture\">sanitizeFixture</a>","description":"<p>Sanitize a fixture object by resolving lookup values and ensuring proper data types.</p>"},{"title":"DoboModel.sanitizeId","link":"<a href=\"DoboModel.html#.sanitizeId\">sanitizeId</a>","description":"<p>Sanitize the given ID based on the model's properties.</p>"},{"title":"DoboModel.sanitizeRecord","link":"<a href=\"DoboModel.html#.sanitizeRecord\">sanitizeRecord</a>","description":"<p>Sanitize a record object based on the model's properties and rules.</p>"},{"title":"DoboModel.sanitizeRef","link":"<a href=\"DoboModel.html#.sanitizeRef\">sanitizeRef</a>","description":"<p>Sanitize a reference object based on the model's properties and rules.</p>"},{"title":"DoboModel.updateRecord","link":"<a href=\"DoboModel.html#.updateRecord\">updateRecord</a>","description":"<p>Updates an existing record in the model's underlying data store based on the provided ID and data.</p>\n<p>If no arguments are provided, it automatically turns into a chainable {@link DoboAction} object.</p>"},{"title":"DoboModel.upsertRecord","link":"<a href=\"DoboModel.html#.upsertRecord\">upsertRecord</a>","description":"<p>Upserts a record in the model's underlying data store. If a record with the specified ID exists, it updates that record; otherwise, it creates a new record.</p>\n<p>If no arguments are provided, it automatically turns into a chainable {@link DoboAction} object.</p>"},{"title":"DoboModel.validate","link":"<a href=\"DoboModel.html#.validate\">validate</a>","description":"<p>Validate body object against JOI model</p>"},{"title":"actionFactory","link":"<a href=\"global.html#actionFactory\">actionFactory</a>","description":"<p>Action factory function</p>"},{"title":"adapterFactory","link":"<a href=\"global.html#adapterFactory\">adapterFactory</a>","description":"<p>Adapter factory function.</p>"},{"title":"connectionFactory","link":"<a href=\"global.html#connectionFactory\">connectionFactory</a>","description":"<p>Connection factory</p>"},{"title":"external:Tools","link":"<a href=\"external-Tools.html\">Tools</a>"},{"title":"featureFactory","link":"<a href=\"global.html#featureFactory\">featureFactory</a>","description":"<p>Feature factory function.</p>"},{"title":"modelFactory","link":"<a href=\"global.html#modelFactory\">modelFactory</a>","description":"<p>Model factory.</p>"},{"title":"module:Helper","link":"<a href=\"module-Helper.html\">Helper</a>"},{"title":"module:Helper.collectAdapters","link":"<a href=\"module-Helper.html#.collectAdapters\">collectAdapters</a>","description":"<p>Collects all database adapters from loaded plugins.</p>"},{"title":"module:Helper.collectConnections","link":"<a href=\"module-Helper.html#.collectConnections\">collectConnections</a>","description":"<p>Collects all database connections from loaded plugins, initializes their adapters, and ensures that a default connection is available.\nIt also handles any memory-based connections and merges their models into a single memory connection.</p>"},{"title":"module:Helper.collectFeatures","link":"<a href=\"module-Helper.html#.collectFeatures\">collectFeatures</a>","description":"<p>Collects all model features from loaded plugins</p>"},{"title":"module:Helper.collectModels","link":"<a href=\"module-Helper.html#.collectModels\">collectModels</a>","description":"<p>Collects all model schemas from the application, sanitizes them, and creates model instances.\nIt also handles any buildStart and buildEnd handlers defined in the model definitions.</p>"},{"title":"module:Helper.sanitizeAll","link":"<a href=\"module-Helper.html#.sanitizeAll\">sanitizeAll</a>","description":"<p>Sanitizes all model schemas, ensuring that properties, indexes, and references are properly defined and validated.\nIt also determines the sortable fields based on the defined indexes.</p>"},{"title":"module:Helper.sanitizeRef","link":"<a href=\"module-Helper.html#.sanitizeRef\">sanitizeRef</a>","description":"<p>Sanitizes the references in a model schema, ensuring that all references point to valid models and properties.\nIt checks for duplicate reference keys and validates the existence of referenced models and properties.</p>"},{"title":"module:Helper/Model","link":"<a href=\"module-Helper_Model.html\">Helper/Model</a>","description":"<p>Helper functions for model operations in the Dobo framework.</p>"},{"title":"module:Helper/Model.buildFilterQuery","link":"<a href=\"module-Helper_Model.html#.buildFilterQuery\">buildFilterQuery</a>","description":"<p>Builds a sanitized filter query for the given filter.</p>"},{"title":"module:Helper/Model.buildFilterSearch","link":"<a href=\"module-Helper_Model.html#.buildFilterSearch\">buildFilterSearch</a>","description":"<p>Builds a search filter from the given filter object.</p>"},{"title":"module:Helper/Model.clearCache","link":"<a href=\"module-Helper_Model.html#.clearCache\">clearCache</a>","description":"<p>Clears the cache for a specific record ID and related find operations.</p>"},{"title":"module:Helper/Model.cloneOptions","link":"<a href=\"module-Helper_Model.html#.cloneOptions\">cloneOptions</a>","description":"<p>Clone options object and omit some keys to avoid reference issues</p>"},{"title":"module:Helper/Model.copyAttachment","link":"<a href=\"module-Helper_Model.html#.copyAttachment\">copyAttachment</a>","description":"<p>Copies attachments for a given record.</p>"},{"title":"module:Helper/Model.execDynHook","link":"<a href=\"module-Helper_Model.html#.execDynHook\">execDynHook</a>","description":"<p>Executes a dynamic hook function with the provided name and arguments.</p>"},{"title":"module:Helper/Model.execHook","link":"<a href=\"module-Helper_Model.html#.execHook\">execHook</a>","description":"<p>Executes a hook function with the provided name and arguments.</p>"},{"title":"module:Helper/Model.execModelHook","link":"<a href=\"module-Helper_Model.html#.execModelHook\">execModelHook</a>","description":"<p>Executes a model hook function with the provided name and arguments.</p>"},{"title":"module:Helper/Model.execValidation","link":"<a href=\"module-Helper_Model.html#.execValidation\">execValidation</a>","description":"<p>Executes validation on the provided body with the given options.</p>"},{"title":"module:Helper/Model.getAttachmentPath","link":"<a href=\"module-Helper_Model.html#.getAttachmentPath\">getAttachmentPath</a>","description":"<p>Gets the attachment path for a given record and field.</p>"},{"title":"module:Helper/Model.getFilterAndOptions","link":"<a href=\"module-Helper_Model.html#.getFilterAndOptions\">getFilterAndOptions</a>","description":"<p>Prepares and returns the filter and options for a given action.</p>"},{"title":"module:Helper/Model.getRefs","link":"<a href=\"module-Helper_Model.html#.getRefs\">getRefs</a>","description":"<p>Gets reference records for the given records.</p>"},{"title":"module:Helper/Model.handleAttachmentUpload","link":"<a href=\"module-Helper_Model.html#.handleAttachmentUpload\">handleAttachmentUpload</a>","description":"<p>Handles attachment uploads for a given record and trigger.</p>"},{"title":"module:Helper/Model.handleReq","link":"<a href=\"module-Helper_Model.html#.handleReq\">handleReq</a>","description":"<p>Handles a request for a given action trigger.</p>"},{"title":"module:Helper/Model.mergeAttachmentInfo","link":"<a href=\"module-Helper_Model.html#.mergeAttachmentInfo\">mergeAttachmentInfo</a>","description":"<p>Merges attachment information into the given record.</p>"},{"title":"module:Helper/Model.preparePagination","link":"<a href=\"module-Helper_Model.html#.preparePagination\">preparePagination</a>","description":"<p>Prepare pagination parameters for a query:</p>\n<ul>\n<li>Ensures that the limit does not exceed the maximum allowed limit.</li>\n<li>Ensures that the page number is within the allowed range.</li>\n<li>Calculates the number of records to skip based on the page and limit.</li>\n<li>Builds the sort order based on the provided sort input.</li>\n</ul>"},{"title":"module:Helper/Model.sanitizeQuery","link":"<a href=\"module-Helper_Model.html#.sanitizeQuery\">sanitizeQuery</a>","description":"<p>Sanitizes a query object by ensuring that its fields and values conform to the model's schema.</p>"},{"title":"module:Helper~applyFeature","link":"<a href=\"module-Helper.html#~applyFeature\">applyFeature</a>","description":"<p>Applies a feature to a model schema, adding properties, rules, hooks, and other\nconfigurations as defined by the feature.</p>"},{"title":"module:Helper~createSchema","link":"<a href=\"module-Helper.html#~createSchema\">createSchema</a>","description":"<p>Creates a model schema by sanitizing its properties, features, and indexes, and ensuring that all references are valid.\nIt also applies any buildStart and buildEnd handlers defined in the schema.</p>"},{"title":"module:Helper~findAllFeats","link":"<a href=\"module-Helper.html#~findAllFeats\">findAllFeats</a>","description":"<p>Finds and applies all features for a given model schema, ensuring that each feature is properly processed</p>"},{"title":"module:Helper~findAllIndexes","link":"<a href=\"module-Helper.html#~findAllIndexes\">findAllIndexes</a>","description":"<p>Finds and applies all indexes for a given model schema, ensuring that each index is properly processed</p>"},{"title":"module:Helper~findAllProps","link":"<a href=\"module-Helper.html#~findAllProps\">findAllProps</a>","description":"<p>Finds and sanitizes all properties for a given model schema, ensuring that the 'id' property is included and\nthat all properties are properly processed.</p>"},{"title":"module:Helper~sanitizeProp","link":"<a href=\"module-Helper.html#~sanitizeProp\">sanitizeProp</a>","description":"<p>Sanitizes a property definition for a model, ensuring it adheres to the expected structure and types.\nIt handles various property attributes such as type, index, required status, and more.</p>\n<p>If the property is virtual, it processes it accordingly; otherwise, it adds it to the model's properties\nand indexes.</p>"},{"title":"module:Hook","link":"<a href=\"module-Hook.html\">Hook</a>","description":"<p>Available hooks for Dobo's operations. You can use these hooks to customize the behavior of the model's CRUD operations.</p>\n<p>For any of the hooks below, you can also use the <code>modelName</code> in camelCase format to create a model-specific hook. If you\nchoose to use this format, you must omit the first parameter (<code>model</code>) so that the hook function handler syntax will become like this:</p>\n<pre class=\"prettyprint source lang-js\"><code>dobo.{modelName}:beforeCreateRecord (body, options)\ndobo.{modelName}:afterCreateRecord (body, options)\ndobo.{modelName}:beforeFindRecord (filter, options)\ndobo.{modelName}:afterFindRecord (filter, result, options)\n...\n</code></pre>\n<p>You can use both formats simultaneously if you want. In that case, they will be executed in this order:</p>\n<pre class=\"prettyprint source lang-js\"><code>dobo:beforeCreateRecord (model, body, options)\ndobo.{modelName}:beforeCreateRecord (body, options)\n...\ndobo.{modelName}:afterCreateRecord (body, result, options)\ndobo:afterCreateRecord (model, body, result, options)\n</code></pre>\n<p>For both formats, there are their counterparts that run deep inside the adapter.\nOnly use these hooks if you know what you are doing.</p>\n<p>Their syntax is similar to the above, with one exception: you need to put suffix <code>.adapter</code> after <code>dobo</code>:</p>\n<pre class=\"prettyprint source lang-js\"><code>dobo.adapter:beforeAdapterCreateRecord (model, body, options)\ndobo.adapter.{modelName}:beforeAdapterCreateRecord (body, options)\n</code></pre>"},{"title":"module:Hook.dobo:afterCountRecord","link":"<a href=\"module-Hook.html#.dobo:afterCountRecord\">dobo:afterCountRecord</a>","description":"<p>Hook that is called after counting records.</p>"},{"title":"module:Hook.dobo:afterCreateRecord","link":"<a href=\"module-Hook.html#.dobo:afterCreateRecord\">dobo:afterCreateRecord</a>","description":"<p>Hook that is called after creating a record.</p>"},{"title":"module:Hook.dobo:afterFindAllRecord","link":"<a href=\"module-Hook.html#.dobo:afterFindAllRecord\">dobo:afterFindAllRecord</a>","description":"<p>Hook that is called after finding all records.</p>"},{"title":"module:Hook.dobo:afterFindOneRecord","link":"<a href=\"module-Hook.html#.dobo:afterFindOneRecord\">dobo:afterFindOneRecord</a>","description":"<p>Hook that is called after finding one record.</p>"},{"title":"module:Hook.dobo:afterFindRecord","link":"<a href=\"module-Hook.html#.dobo:afterFindRecord\">dobo:afterFindRecord</a>","description":"<p>Hook that is called after finding records.</p>"},{"title":"module:Hook.dobo:afterGetRecord","link":"<a href=\"module-Hook.html#.dobo:afterGetRecord\">dobo:afterGetRecord</a>","description":"<p>Hook that is called after getting a record by ID.</p>"},{"title":"module:Hook.dobo:afterRemoveRecord","link":"<a href=\"module-Hook.html#.dobo:afterRemoveRecord\">dobo:afterRemoveRecord</a>","description":"<p>Hook that is called after removing a record.</p>"},{"title":"module:Hook.dobo:afterUpdateRecord","link":"<a href=\"module-Hook.html#.dobo:afterUpdateRecord\">dobo:afterUpdateRecord</a>","description":"<p>Hook that is called after updating a record.</p>"},{"title":"module:Hook.dobo:beforeCountRecord","link":"<a href=\"module-Hook.html#.dobo:beforeCountRecord\">dobo:beforeCountRecord</a>","description":"<p>Hook that is called before counting records.</p>"},{"title":"module:Hook.dobo:beforeCreateRecord","link":"<a href=\"module-Hook.html#.dobo:beforeCreateRecord\">dobo:beforeCreateRecord</a>","description":"<p>Hook that is called before creating a record.</p>"},{"title":"module:Hook.dobo:beforeFindAllRecord","link":"<a href=\"module-Hook.html#.dobo:beforeFindAllRecord\">dobo:beforeFindAllRecord</a>","description":"<p>Hook that is called before finding all records.</p>"},{"title":"module:Hook.dobo:beforeFindOneRecord","link":"<a href=\"module-Hook.html#.dobo:beforeFindOneRecord\">dobo:beforeFindOneRecord</a>","description":"<p>Hook that is called before finding one record.</p>"},{"title":"module:Hook.dobo:beforeFindRecord","link":"<a href=\"module-Hook.html#.dobo:beforeFindRecord\">dobo:beforeFindRecord</a>","description":"<p>Hook that is called before finding records.</p>"},{"title":"module:Hook.dobo:beforeGetRecord","link":"<a href=\"module-Hook.html#.dobo:beforeGetRecord\">dobo:beforeGetRecord</a>","description":"<p>Hook that is called before getting a record by ID.</p>"},{"title":"module:Hook.dobo:beforeRemoveRecord","link":"<a href=\"module-Hook.html#.dobo:beforeRemoveRecord\">dobo:beforeRemoveRecord</a>","description":"<p>Hook that is called before removing a record.</p>"},{"title":"module:Hook.dobo:beforeUpdateRecord","link":"<a href=\"module-Hook.html#.dobo:beforeUpdateRecord\">dobo:beforeUpdateRecord</a>","description":"<p>Hook that is called before updating a record.</p>"},{"title":"pluginFactory","link":"<a href=\"global.html#pluginFactory\">pluginFactory</a>","description":"<p>Plugin factory</p>"}]}