dobo 2.30.7 → 2.32.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/.jsdoc.conf.json +1 -1
  2. package/docs/Dobo.html +1 -24
  3. package/docs/DoboAction.html +13 -0
  4. package/docs/DoboAdapter.html +3 -0
  5. package/docs/DoboConnection.html +3 -0
  6. package/docs/DoboFeature.html +3 -0
  7. package/docs/DoboModel.html +51 -0
  8. package/docs/data/search.json +1 -1
  9. package/docs/extend_bajo_hook-docs.js.html +241 -0
  10. package/docs/external-Tools.html +3 -0
  11. package/docs/global.html +1 -5
  12. package/docs/index.html +1 -1
  13. package/docs/index.js.html +434 -380
  14. package/docs/lib_factory_action.js.html +290 -0
  15. package/docs/lib_factory_adapter.js.html +1057 -0
  16. package/docs/lib_factory_connection.js.html +112 -0
  17. package/docs/lib_factory_feature.js.html +55 -0
  18. package/docs/lib_factory_model.js.html +503 -0
  19. package/docs/lib_factory_model_build.js.html +28 -0
  20. package/docs/lib_factory_model_clear-record.js.html +33 -0
  21. package/docs/lib_factory_model_count-record.js.html +45 -0
  22. package/docs/lib_factory_model_create-record.js.html +52 -0
  23. package/docs/lib_factory_model_drop.js.html +29 -0
  24. package/docs/lib_factory_model_exists.js.html +29 -0
  25. package/docs/lib_factory_model_find-all-record.js.html +115 -0
  26. package/docs/lib_factory_model_find-one-record.js.html +41 -0
  27. package/docs/lib_factory_model_find-record.js.html +85 -0
  28. package/docs/lib_factory_model_get-record.js.html +55 -0
  29. package/docs/lib_factory_model_helper.js.html +579 -0
  30. package/docs/lib_factory_model_remove-record.js.html +47 -0
  31. package/docs/lib_factory_model_sanitize-body.js.html +60 -0
  32. package/docs/lib_factory_model_sanitize-fixture.js.html +59 -0
  33. package/docs/lib_factory_model_sanitize-record.js.html +73 -0
  34. package/docs/lib_factory_model_update-record.js.html +61 -0
  35. package/docs/lib_factory_model_upsert-record.js.html +74 -0
  36. package/docs/{method_validate.js.html → lib_factory_model_validate.js.html} +109 -73
  37. package/docs/lib_helper.js.html +466 -0
  38. package/docs/module-Helper.html +3 -0
  39. package/docs/module-Helper_Model.html +3 -0
  40. package/docs/module-Hook.html +15 -0
  41. package/docs/scripts/core.js +477 -476
  42. package/docs/scripts/resize.js +36 -36
  43. package/docs/scripts/search.js +105 -105
  44. package/docs/scripts/third-party/fuse.js +1 -1
  45. package/docs/scripts/third-party/hljs-line-num-original.js +285 -282
  46. package/docs/scripts/third-party/hljs-line-num.js +1 -1
  47. package/docs/scripts/third-party/hljs-original.js +1202 -1195
  48. package/docs/scripts/third-party/hljs.js +1 -1
  49. package/docs/scripts/third-party/popper.js +1 -1
  50. package/docs/scripts/third-party/tippy.js +1 -1
  51. package/docs/scripts/third-party/tocbot.js +509 -508
  52. package/docs/static/home.md +3 -1
  53. package/extend/bajo/hook-docs.js +238 -0
  54. package/extend/bajo/intl/en-US.json +9 -9
  55. package/extend/bajo/intl/id.json +9 -9
  56. package/extend/bajoCli/applet/rebuild-model.js +2 -2
  57. package/extend/dobo/{driver → adapter}/memory.js +6 -6
  58. package/extend/dobo/feature/immutable.js +2 -2
  59. package/extend/dobo/feature/removed-at.js +1 -1
  60. package/index.js +33 -30
  61. package/lib/factory/action.js +145 -18
  62. package/lib/factory/adapter.js +1054 -0
  63. package/lib/factory/connection.js +46 -22
  64. package/lib/factory/feature.js +23 -3
  65. package/lib/factory/model/build.js +11 -2
  66. package/lib/factory/model/bulk-create-record.js +2 -2
  67. package/lib/factory/model/clear-record.js +13 -3
  68. package/lib/factory/model/count-record.js +13 -2
  69. package/lib/factory/model/create-aggregate.js +2 -2
  70. package/lib/factory/model/create-attachment.js +1 -1
  71. package/lib/factory/model/create-histogram.js +2 -2
  72. package/lib/factory/model/create-record.js +15 -2
  73. package/lib/factory/model/drop.js +12 -2
  74. package/lib/factory/model/exists.js +10 -6
  75. package/lib/factory/model/find-all-record.js +14 -3
  76. package/lib/factory/model/find-attachment.js +1 -1
  77. package/lib/factory/model/find-one-record.js +13 -1
  78. package/lib/factory/model/find-record.js +17 -53
  79. package/lib/factory/model/get-record.js +11 -39
  80. package/lib/factory/model/{_util.js → helper.js} +176 -16
  81. package/lib/factory/model/remove-attachment.js +1 -1
  82. package/lib/factory/model/remove-record.js +11 -28
  83. package/lib/factory/model/sanitize-body.js +14 -12
  84. package/lib/factory/model/sanitize-fixture.js +17 -4
  85. package/lib/factory/model/sanitize-record.js +9 -6
  86. package/lib/factory/model/transaction.js +2 -2
  87. package/lib/factory/model/update-record.js +12 -40
  88. package/lib/factory/model/upsert-record.js +13 -42
  89. package/lib/factory/model/validate.js +47 -14
  90. package/lib/factory/model.js +301 -23
  91. package/lib/{collect-models.js → helper.js} +463 -364
  92. package/package.json +1 -1
  93. package/wiki/CHANGES.md +17 -7
  94. package/wiki/ECOSYSTEM.md +7 -7
  95. package/wiki/GETTING-STARTED.md +3 -3
  96. package/wiki/QUERY-LANGUAGE.md +1 -1
  97. package/docs/lib_collect-connections.js.html +0 -39
  98. package/docs/lib_collect-drivers.js.html +0 -52
  99. package/docs/lib_collect-features.js.html +0 -36
  100. package/docs/lib_collect-schemas.js.html +0 -94
  101. package/docs/lib_index.js.html +0 -6
  102. package/docs/method_model_create.js.html +0 -35
  103. package/docs/method_model_drop.js.html +0 -34
  104. package/docs/method_model_exists.js.html +0 -40
  105. package/docs/method_record_count.js.html +0 -69
  106. package/docs/method_record_create.js.html +0 -114
  107. package/docs/method_record_find-all.js.html +0 -44
  108. package/docs/method_record_find-one.js.html +0 -73
  109. package/docs/method_record_find.js.html +0 -118
  110. package/docs/method_record_get.js.html +0 -92
  111. package/docs/method_record_remove.js.html +0 -75
  112. package/docs/method_record_update.js.html +0 -107
  113. package/docs/method_record_upsert.js.html +0 -54
  114. package/docs/method_sanitize_body.js.html +0 -88
  115. package/docs/method_sanitize_date.js.html +0 -30
  116. package/docs/method_sanitize_id.js.html +0 -20
  117. package/docs/module-Lib.html +0 -3
  118. package/lib/collect-connections.js +0 -56
  119. package/lib/collect-drivers.js +0 -35
  120. package/lib/collect-features.js +0 -40
  121. package/lib/factory/driver.js +0 -574
  122. package/lib/factory/model/sanitize-id.js +0 -7
  123. package/lib/index.js +0 -3
@@ -1 +1 @@
1
- {"list":[{"title":"Dobo","link":"<a href=\"Dobo.html\">Dobo</a>"},{"title":"Dobo#connections","link":"<a href=\"Dobo.html#connections\">connections</a>"},{"title":"Dobo#drivers","link":"<a href=\"Dobo.html#drivers\">drivers</a>"},{"title":"Dobo#features","link":"<a href=\"Dobo.html#features\">features</a>"},{"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.collectDrivers|Collecting all drivers}</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.collectSchemas|Collecting all schemas}</li>\n</ul>"},{"title":"Dobo#modelCreate","link":"<a href=\"Dobo.html#modelCreate\">modelCreate</a>","description":"<p>Create a new model:</p>\n<ul>\n<li>read corresponding schema</li>\n<li>attempt to create table/database/collection accordingly</li>\n</ul>"},{"title":"Dobo#modelDrop","link":"<a href=\"Dobo.html#modelDrop\">modelDrop</a>","description":"<p>Drop database model</p>"},{"title":"Dobo#modelExists","link":"<a href=\"Dobo.html#modelExists\">modelExists</a>","description":"<p>Check if model exists already</p>"},{"title":"Dobo#pickRecord","link":"<a href=\"Dobo.html#pickRecord\">pickRecord</a>","description":"<p>Pick only fields defined from a record</p>"},{"title":"Dobo#prepPagination","link":"<a href=\"Dobo.html#prepPagination\">prepPagination</a>","description":"<p>Prepare records pagination:</p>\n<ul>\n<li>making sure records limit is obeyed</li>\n<li>making sure page is a positive value</li>\n<li>if skip is given, recalculate limit to use skip instead of page number</li>\n<li>Build sort info</li>\n</ul>"},{"title":"Dobo#recordCount","link":"<a href=\"Dobo.html#recordCount\">recordCount</a>","description":"<p>Return the number of records found by given filter</p>"},{"title":"Dobo#recordCreate","link":"<a href=\"Dobo.html#recordCreate\">recordCreate</a>","description":"<p>Create a new record</p>\n<p>Example:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { recordCreate } = this.app.dobo\nconst { body } = {\n id: 'ID',\n name: 'Indonesia',\n iso3: 'IDN'\n}\nconst result = await recordCreate('CdbCountry', body)\n</code></pre>"},{"title":"Dobo#recordFind","link":"<a href=\"Dobo.html#recordFind\">recordFind</a>","description":"<p>Find records by model's name and given filter</p>\n<p>Example: find records from model <strong>CdbCountry</strong> where its id is 'ID' or 'MY',\nsorted by <code>name</code> in ascending order and return only its <code>id</code>, <code>name</code> and <code>iso3</code></p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { recordFind } = this.app.dobo\nconst query = { id: { $in: ['ID', 'MY'] } }\nconst sort = { name: 1 }\nconst fields = ['id', 'name', 'iso3']\nconst result = await recordFind('CdbCountry', { query, sort }, { fields })\n</code></pre>"},{"title":"Dobo#recordFindAll","link":"<a href=\"Dobo.html#recordFindAll\">recordFindAll</a>","description":"<p>Find all records by model's name and given filter.</p>\n<p>The total number of records returned is limited by <code>hardLimit</code> value set in {@tutorial config} file.</p>"},{"title":"Dobo#recordFindOne","link":"<a href=\"Dobo.html#recordFindOne\">recordFindOne</a>","description":"<p>Find the first record by model's name and given filter.</p>"},{"title":"Dobo#recordGet","link":"<a href=\"Dobo.html#recordGet\">recordGet</a>","description":"<p>Get record by model's name and record ID</p>\n<p>Example:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { recordGet } = this.app.dobo\nconst fields = ['id', 'name', 'iso3']\nconst result = await recordGet('CdbCountry', 'ID', { fields })\n</code></pre>"},{"title":"Dobo#recordRemove","link":"<a href=\"Dobo.html#recordRemove\">recordRemove</a>","description":"<p>Remove existing record by it's ID. All attachments bound to this record will also be removed forever.</p>\n<p>Example:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { recordRemove } = this.app.dobo\nconst result = await recordRemove('CdbCountry', 'ID')\n</code></pre>"},{"title":"Dobo#recordUpdate","link":"<a href=\"Dobo.html#recordUpdate\">recordUpdate</a>","description":"<p>Update a record by it's ID and body payload</p>\n<p>Example:</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const { recordUpdate } = this.app.dobo\nconst { body } = {\n name: 'Republic of Indonesia',\n phoneCode: '+62'\n}\nconst result = await recordUpdate('CdbCountry', 'ID', body)\n</code></pre>"},{"title":"Dobo#recordUpsert","link":"<a href=\"Dobo.html#recordUpsert\">recordUpsert</a>","description":"<p>Update a record by payload's ID. If no record is found by given ID, a new one will be created instead.</p>\n<p>Missing ID in payload always results a new record creation.</p>\n<pre class=\"prettyprint source\"><code></code></pre>"},{"title":"Dobo#schemas","link":"<a href=\"Dobo.html#schemas\">schemas</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.alias","link":"<a href=\"Dobo.html#.alias\">alias</a>"},{"title":"Dobo.propType","link":"<a href=\"Dobo.html#.propType\">propType</a>"},{"title":"Dobo.sanitizeBody","link":"<a href=\"Dobo.html#.sanitizeBody\">sanitizeBody</a>","description":"<p>Sanitize payload body against schema</p>"},{"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":"Dobo.sanitizeId","link":"<a href=\"Dobo.html#.sanitizeId\">sanitizeId</a>","description":"<p>Sanitize id according it's schema</p>"},{"title":"Dobo.validate","link":"<a href=\"Dobo.html#.validate\">validate</a>","description":"<p>Validate value against JOI schema</p>"},{"title":"TPropType","link":"<a href=\"global.html#TPropType\">TPropType</a>"},{"title":"TRecordCountOptions","link":"<a href=\"global.html#TRecordCountOptions\">TRecordCountOptions</a>"},{"title":"TRecordCreateOptions","link":"<a href=\"global.html#TRecordCreateOptions\">TRecordCreateOptions</a>"},{"title":"TRecordFilter","link":"<a href=\"global.html#TRecordFilter\">TRecordFilter</a>"},{"title":"TRecordFindOptions","link":"<a href=\"global.html#TRecordFindOptions\">TRecordFindOptions</a>"},{"title":"TRecordFindResult","link":"<a href=\"global.html#TRecordFindResult\">TRecordFindResult</a>"},{"title":"TRecordGetOptions","link":"<a href=\"global.html#TRecordGetOptions\">TRecordGetOptions</a>"},{"title":"TRecordGetResult","link":"<a href=\"global.html#TRecordGetResult\">TRecordGetResult</a>"},{"title":"TRecordPagination","link":"<a href=\"global.html#TRecordPagination\">TRecordPagination</a>"},{"title":"TRecordRemoveOptions","link":"<a href=\"global.html#TRecordRemoveOptions\">TRecordRemoveOptions</a>"},{"title":"TRecordSort","link":"<a href=\"global.html#TRecordSort\">TRecordSort</a>","description":"<p>Key value pairs used as sort information:</p>\n<ul>\n<li>Key represent model's field name</li>\n<li>value represent its sort order: <code>1</code> for ascending order, and <code>-1</code> for descending order</li>\n</ul>\n<p>Example: to sort by firstName (ascending) and lastName (descending)</p>\n<pre class=\"prettyprint source lang-javascript\"><code>const sort = {\n firstName: 1,\n lastName: -1\n}\n</code></pre>"},{"title":"TRecordSortKey","link":"<a href=\"global.html#TRecordSortKey\">TRecordSortKey</a>"},{"title":"TRecordUpdateOptions","link":"<a href=\"global.html#TRecordUpdateOptions\">TRecordUpdateOptions</a>"},{"title":"TValidator","link":"<a href=\"global.html#TValidator\">TValidator</a>"},{"title":"TValidatorBoolean","link":"<a href=\"global.html#TValidatorBoolean\">TValidatorBoolean</a>"},{"title":"TValidatorDate","link":"<a href=\"global.html#TValidatorDate\">TValidatorDate</a>"},{"title":"TValidatorNumber","link":"<a href=\"global.html#TValidatorNumber\">TValidatorNumber</a>"},{"title":"TValidatorString","link":"<a href=\"global.html#TValidatorString\">TValidatorString</a>"},{"title":"TValidatorTimestamp","link":"<a href=\"global.html#TValidatorTimestamp\">TValidatorTimestamp</a>"},{"title":"factory","link":"<a href=\"global.html#factory\">factory</a>","description":"<p>Plugin factory</p>"},{"title":"module:Lib","link":"<a href=\"module-Lib.html\">Lib</a>"},{"title":"module:Lib.collectConnections","link":"<a href=\"module-Lib.html#.collectConnections\">collectConnections</a>","description":"<p>Collect all database connections from {@tutorial config}.</p>"},{"title":"module:Lib.collectDrivers","link":"<a href=\"module-Lib.html#.collectDrivers\">collectDrivers</a>","description":"<p>Collect all database drivers from loaded plugins</p>"},{"title":"module:Lib.collectFeatures","link":"<a href=\"module-Lib.html#.collectFeatures\">collectFeatures</a>","description":"<p>Collect all database features from all loaded plugins</p>"},{"title":"module:Lib.collectSchemas","link":"<a href=\"module-Lib.html#.collectSchemas\">collectSchemas</a>","description":"<p>Collect all database schemas from loaded plugins</p>"}]}
1
+ {"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>"}]}
@@ -0,0 +1,241 @@
1
+ <!DOCTYPE html><html lang="en" style="font-size:16px"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Source: extend/bajo/hook-docs.js</title><!--[if lt IE 9]>
2
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
3
+ <![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="light"><div class="sidebar-container"><div class="sidebar" id="sidebar"><a href="/" class="sidebar-title sidebar-title-anchor">Dobo API</a><div class="sidebar-items-container"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Dobo.html">Dobo</a></div><div class="sidebar-section-children"><a href="DoboAction.html">DoboAction</a></div><div class="sidebar-section-children"><a href="DoboAdapter.html">DoboAdapter</a></div><div class="sidebar-section-children"><a href="DoboConnection.html">DoboConnection</a></div><div class="sidebar-section-children"><a href="DoboFeature.html">DoboFeature</a></div><div class="sidebar-section-children"><a href="DoboModel.html">DoboModel</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-Helper.html">Helper</a></div><div class="sidebar-section-children"><a href="module-Helper_Model.html">Helper/Model</a></div><div class="sidebar-section-children"><a href="module-Hook.html">Hook</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-externals"><div>Externals</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="external-Tools.html">Tools</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#actionFactory">actionFactory</a></div><div class="sidebar-section-children"><a href="global.html#adapterFactory">adapterFactory</a></div><div class="sidebar-section-children"><a href="global.html#connectionFactory">connectionFactory</a></div><div class="sidebar-section-children"><a href="global.html#featureFactory">featureFactory</a></div><div class="sidebar-section-children"><a href="global.html#modelFactory">modelFactory</a></div><div class="sidebar-section-children"><a href="global.html#pluginFactory">pluginFactory</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"><div class="navbar-item"><a id="" href="https://www.npmjs.com/package/dobo" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/dobo" target="">Github</a></div><div class="navbar-item"><a id="" href="https://dobo.bajo.app/" target="">Dobo</a></div><div class="navbar-item"><a id="" href="https://bajo.app/" target="">Bajo</a></div></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">On this page</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section id="source-page" class="source-page"><header><h1 id="title" class="has-anchor">extend_bajo_hook-docs.js</h1></header><article><pre class="prettyprint source lang-js"><code>/**
4
+ * Available hooks for Dobo's operations. You can use these hooks to customize the behavior of the model's CRUD operations.
5
+ *
6
+ * For any of the hooks below, you can also use the `modelName` in camelCase format to create a model-specific hook. If you
7
+ * choose to use this format, you must omit the first parameter (`model`) so that the hook function handler syntax will become like this:
8
+ *
9
+ * ```js
10
+ * dobo.{modelName}:beforeCreateRecord (body, options)
11
+ * dobo.{modelName}:afterCreateRecord (body, options)
12
+ * dobo.{modelName}:beforeFindRecord (filter, options)
13
+ * dobo.{modelName}:afterFindRecord (filter, result, options)
14
+ * ...
15
+ * ```
16
+ *
17
+ * You can use both formats simultaneously if you want. In that case, they will be executed in this order:
18
+ * ```js
19
+ * dobo:beforeCreateRecord (model, body, options)
20
+ * dobo.{modelName}:beforeCreateRecord (body, options)
21
+ * ...
22
+ * dobo.{modelName}:afterCreateRecord (body, result, options)
23
+ * dobo:afterCreateRecord (model, body, result, options)
24
+ * ```
25
+ *
26
+ * For both formats, there are their counterparts that run deep inside the adapter.
27
+ * Only use these hooks if you know what you are doing.
28
+ *
29
+ * Their syntax is similar to the above, with one exception: you need to put suffix `.adapter` after `dobo`:
30
+ *
31
+ * ```js
32
+ * dobo.adapter:beforeAdapterCreateRecord (model, body, options)
33
+ * dobo.adapter.{modelName}:beforeAdapterCreateRecord (body, options)
34
+ * ```
35
+ * @module Hook
36
+ */
37
+ /**
38
+ * Hook that is called before creating a record.
39
+ *
40
+ * @memberof module:Hook
41
+ * @method
42
+ * @async
43
+ * @name dobo:beforeCreateRecord
44
+ * @param {DoboModel} model - The model instance
45
+ * @param {object} body - The body payload to be created
46
+ * @param {DoboModel.TOptions} options - The options object
47
+ */
48
+
49
+ /**
50
+ * Hook that is called after creating a record.
51
+ *
52
+ * @memberof module:Hook
53
+ * @method
54
+ * @async
55
+ * @name dobo:afterCreateRecord
56
+ * @param {DoboModel} model - The model instance
57
+ * @param {object} body - The body payload to be created
58
+ * @param {DoboModel.TResultRecord} result - The result of the create operation
59
+ * @param {DoboModel.TOptions} options - The options object
60
+ */
61
+
62
+ /**
63
+ * Hook that is called before finding records.
64
+ *
65
+ * @memberof module:Hook
66
+ * @method
67
+ * @async
68
+ * @name dobo:beforeFindRecord
69
+ * @param {DoboModel} model - The model instance
70
+ * @param {DoboModel.TFilter} filter - The filter criteria to apply when finding records
71
+ * @param {DoboModel.TOptions} options - The options object
72
+ */
73
+
74
+ /**
75
+ * Hook that is called after finding records.
76
+ *
77
+ * @memberof module:Hook
78
+ * @method
79
+ * @async
80
+ * @name dobo:afterFindRecord
81
+ * @param {DoboModel} model - The model instance
82
+ * @param {DoboModel.TFilter} filter - The filter criteria applied when finding records
83
+ * @param {DoboModel.TResultFindRecord} result - The result of the find operation
84
+ * @param {DoboModel.TOptions} options - The options object
85
+ */
86
+
87
+ /**
88
+ * Hook that is called before finding one record.
89
+ *
90
+ * @memberof module:Hook
91
+ * @method
92
+ * @async
93
+ * @name dobo:beforeFindOneRecord
94
+ * @param {DoboModel} model - The model instance
95
+ * @param {DoboModel.TFilter} filter - The filter criteria to apply when finding one record
96
+ * @param {DoboModel.TResultFindRecord} result - The result of the find operation
97
+ * @param {DoboModel.TOptions} options - The options object
98
+ */
99
+
100
+ /**
101
+ * Hook that is called after finding one record.
102
+ *
103
+ * @memberof module:Hook
104
+ * @method
105
+ * @async
106
+ * @name dobo:afterFindOneRecord
107
+ * @param {DoboModel} model - The model instance
108
+ * @param {DoboModel.TFilter} filter - The filter criteria applied when finding one record
109
+ * @param {DoboModel.TResultFindOneRecord} result - The result of the find one operation
110
+ * @param {DoboModel.TOptions} options - The options object
111
+ */
112
+
113
+ /**
114
+ * Hook that is called before finding all records.
115
+ *
116
+ * @memberof module:Hook
117
+ * @method
118
+ * @async
119
+ * @name dobo:beforeFindAllRecord
120
+ * @param {DoboModel} model - The model instance
121
+ * @param {DoboModel.TFilter} filter - The filter criteria to apply when finding all records
122
+ * @param {DoboModel.TOptions} options - The options object
123
+ */
124
+
125
+ /**
126
+ * Hook that is called after finding all records.
127
+ *
128
+ * @memberof module:Hook
129
+ * @method
130
+ * @async
131
+ * @name dobo:afterFindAllRecord
132
+ * @param {DoboModel} model - The model instance
133
+ * @param {DoboModel.TFilter} filter - The filter criteria applied when finding all records
134
+ * @param {DoboModel.TResultFindAllRecord} result - The result of the find all operation
135
+ * @param {DoboModel.TOptions} options - The options object
136
+ */
137
+
138
+ /**
139
+ * Hook that is called before updating a record.
140
+ *
141
+ * @memberof module:Hook
142
+ * @method
143
+ * @async
144
+ * @name dobo:beforeUpdateRecord
145
+ * @param {DoboModel} model - The model instance
146
+ * @param {string|number} id - The ID of the record to be updated
147
+ * @param {object} body - The body payload to be updated
148
+ * @param {DoboModel.TOptions} options - The options object
149
+ */
150
+
151
+ /**
152
+ * Hook that is called after updating a record.
153
+ *
154
+ * @memberof module:Hook
155
+ * @method
156
+ * @async
157
+ * @name dobo:afterUpdateRecord
158
+ * @param {DoboModel} model - The model instance
159
+ * @param {string|number} id - The ID of the record that was updated
160
+ * @param {object} body - The body payload that was updated
161
+ * @param {DoboModel.TResultUpdateRecord} result - The result of the update operation
162
+ * @param {DoboModel.TOptions} options - The options object
163
+ */
164
+
165
+ /**
166
+ * Hook that is called before removing a record.
167
+ *
168
+ * @memberof module:Hook
169
+ * @method
170
+ * @async
171
+ * @name dobo:beforeRemoveRecord
172
+ * @param {DoboModel} model - The model instance
173
+ * @param {string|number} id - The ID of the record to be removed
174
+ * @param {DoboModel.TOptions} options - The options object
175
+ */
176
+
177
+ /**
178
+ * Hook that is called after removing a record.
179
+ *
180
+ * @memberof module:Hook
181
+ * @method
182
+ * @async
183
+ * @name dobo:afterRemoveRecord
184
+ * @param {DoboModel} model - The model instance
185
+ * @param {string|number} id - The ID of the record that was removed
186
+ * @param {DoboModel.TResultRemoveRecord} result - The result of the remove operation
187
+ * @param {DoboModel.TOptions} options - The options object
188
+ */
189
+
190
+ /**
191
+ * Hook that is called before counting records.
192
+ *
193
+ * @memberof module:Hook
194
+ * @method
195
+ * @async
196
+ * @name dobo:beforeCountRecord
197
+ * @param {DoboModel} model - The model instance
198
+ * @param {DoboModel.TFilter} filter - The filter criteria to apply when counting records
199
+ * @param {DoboModel.TOptions} options - The options object
200
+ */
201
+
202
+ /**
203
+ * Hook that is called after counting records.
204
+ *
205
+ * @memberof module:Hook
206
+ * @method
207
+ * @async
208
+ * @name dobo:afterCountRecord
209
+ * @param {DoboModel} model - The model instance
210
+ * @param {DoboModel.TFilter} filter - The filter criteria that was applied when counting records
211
+ * @param {DoboModel.TResultCountRecord} result - The result of the count operation
212
+ * @param {DoboModel.TOptions} options - The options object
213
+ */
214
+
215
+ /**
216
+ * Hook that is called before getting a record by ID.
217
+ *
218
+ * @memberof module:Hook
219
+ * @method
220
+ * @async
221
+ * @name dobo:beforeGetRecord
222
+ * @param {DoboModel} model - The model instance
223
+ * @param {string|number} id - The ID of the record to be retrieved
224
+ * @param {DoboModel.TOptions} options - The options object
225
+ */
226
+
227
+ /**
228
+ * Hook that is called after getting a record by ID.
229
+ *
230
+ * @memberof module:Hook
231
+ * @method
232
+ * @async
233
+ * @name dobo:afterGetRecord
234
+ * @param {DoboModel} model - The model instance
235
+ * @param {string|number} id - The ID of the record that was retrieved
236
+ * @param {DoboModel.TResultGetRecord} result - The result of the get operation
237
+ * @param {DoboModel.TOptions} options - The options object
238
+ */
239
+
240
+ export default {}
241
+ </code></pre></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="close search"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="Search..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">Type anything to view search result</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><a href="/" class="sidebar-title sidebar-title-anchor">Dobo API</a><div class="mobile-nav-links"><div class="navbar-item"><a id="" href="https://www.npmjs.com/package/dobo" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/dobo" target="">Github</a></div><div class="navbar-item"><a id="" href="https://dobo.bajo.app/" target="">Dobo</a></div><div class="navbar-item"><a id="" href="https://bajo.app/" target="">Bajo</a></div></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Dobo.html">Dobo</a></div><div class="sidebar-section-children"><a href="DoboAction.html">DoboAction</a></div><div class="sidebar-section-children"><a href="DoboAdapter.html">DoboAdapter</a></div><div class="sidebar-section-children"><a href="DoboConnection.html">DoboConnection</a></div><div class="sidebar-section-children"><a href="DoboFeature.html">DoboFeature</a></div><div class="sidebar-section-children"><a href="DoboModel.html">DoboModel</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-Helper.html">Helper</a></div><div class="sidebar-section-children"><a href="module-Helper_Model.html">Helper/Model</a></div><div class="sidebar-section-children"><a href="module-Hook.html">Hook</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-externals"><div>Externals</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="external-Tools.html">Tools</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#actionFactory">actionFactory</a></div><div class="sidebar-section-children"><a href="global.html#adapterFactory">adapterFactory</a></div><div class="sidebar-section-children"><a href="global.html#connectionFactory">connectionFactory</a></div><div class="sidebar-section-children"><a href="global.html#featureFactory">featureFactory</a></div><div class="sidebar-section-children"><a href="global.html#modelFactory">modelFactory</a></div><div class="sidebar-section-children"><a href="global.html#pluginFactory">pluginFactory</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script></body></html>
@@ -0,0 +1,3 @@
1
+ <!DOCTYPE html><html lang="en" style="font-size:16px"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>External: Tools</title><!--[if lt IE 9]>
2
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
3
+ <![endif]--><script src="scripts/third-party/hljs.js" defer="defer"></script><script src="scripts/third-party/hljs-line-num.js" defer="defer"></script><script src="scripts/third-party/popper.js" defer="defer"></script><script src="scripts/third-party/tippy.js" defer="defer"></script><script src="scripts/third-party/tocbot.min.js"></script><script>var baseURL="/",locationPathname="";baseURL=(locationPathname=document.location.pathname).substr(0,locationPathname.lastIndexOf("/")+1)</script><link rel="stylesheet" href="styles/clean-jsdoc-theme.min.css"><svg aria-hidden="true" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><defs><symbol id="copy-icon" viewbox="0 0 488.3 488.3"><g><path d="M314.25,85.4h-227c-21.3,0-38.6,17.3-38.6,38.6v325.7c0,21.3,17.3,38.6,38.6,38.6h227c21.3,0,38.6-17.3,38.6-38.6V124 C352.75,102.7,335.45,85.4,314.25,85.4z M325.75,449.6c0,6.4-5.2,11.6-11.6,11.6h-227c-6.4,0-11.6-5.2-11.6-11.6V124 c0-6.4,5.2-11.6,11.6-11.6h227c6.4,0,11.6,5.2,11.6,11.6V449.6z"/><path d="M401.05,0h-227c-21.3,0-38.6,17.3-38.6,38.6c0,7.5,6,13.5,13.5,13.5s13.5-6,13.5-13.5c0-6.4,5.2-11.6,11.6-11.6h227 c6.4,0,11.6,5.2,11.6,11.6v325.7c0,6.4-5.2,11.6-11.6,11.6c-7.5,0-13.5,6-13.5,13.5s6,13.5,13.5,13.5c21.3,0,38.6-17.3,38.6-38.6 V38.6C439.65,17.3,422.35,0,401.05,0z"/></g></symbol><symbol id="search-icon" viewBox="0 0 512 512"><g><g><path d="M225.474,0C101.151,0,0,101.151,0,225.474c0,124.33,101.151,225.474,225.474,225.474 c124.33,0,225.474-101.144,225.474-225.474C450.948,101.151,349.804,0,225.474,0z M225.474,409.323 c-101.373,0-183.848-82.475-183.848-183.848S124.101,41.626,225.474,41.626s183.848,82.475,183.848,183.848 S326.847,409.323,225.474,409.323z"/></g></g><g><g><path d="M505.902,476.472L386.574,357.144c-8.131-8.131-21.299-8.131-29.43,0c-8.131,8.124-8.131,21.306,0,29.43l119.328,119.328 c4.065,4.065,9.387,6.098,14.715,6.098c5.321,0,10.649-2.033,14.715-6.098C514.033,497.778,514.033,484.596,505.902,476.472z"/></g></g></symbol><symbol id="font-size-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11.246 15H4.754l-2 5H.6L7 4h2l6.4 16h-2.154l-2-5zm-.8-2L8 6.885 5.554 13h4.892zM21 12.535V12h2v8h-2v-.535a4 4 0 1 1 0-6.93zM19 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z"/></symbol><symbol id="add-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"/></symbol><symbol id="minus-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M5 11h14v2H5z"/></symbol><symbol id="dark-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M10 7a7 7 0 0 0 12 4.9v.1c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2h.1A6.979 6.979 0 0 0 10 7zm-6 5a8 8 0 0 0 15.062 3.762A9 9 0 0 1 8.238 4.938 7.999 7.999 0 0 0 4 12z"/></symbol><symbol id="light-theme-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 18a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-2a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.515 4.929l1.414-1.414L7.05 5.636 5.636 7.05 3.515 4.93zM16.95 18.364l1.414-1.414 2.121 2.121-1.414 1.414-2.121-2.121zm2.121-14.85l1.414 1.415-2.121 2.121-1.414-1.414 2.121-2.121zM5.636 16.95l1.414 1.414-2.121 2.121-1.414-1.414 2.121-2.121zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></symbol><symbol id="reset-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M18.537 19.567A9.961 9.961 0 0 1 12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10c0 2.136-.67 4.116-1.81 5.74L17 12h3a8 8 0 1 0-2.46 5.772l.997 1.795z"/></symbol><symbol id="down-icon" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7803 6.21967C13.0732 6.51256 13.0732 6.98744 12.7803 7.28033L8.53033 11.5303C8.23744 11.8232 7.76256 11.8232 7.46967 11.5303L3.21967 7.28033C2.92678 6.98744 2.92678 6.51256 3.21967 6.21967C3.51256 5.92678 3.98744 5.92678 4.28033 6.21967L8 9.93934L11.7197 6.21967C12.0126 5.92678 12.4874 5.92678 12.7803 6.21967Z"></path></symbol><symbol id="codepen-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M16.5 13.202L13 15.535v3.596L19.197 15 16.5 13.202zM14.697 12L12 10.202 9.303 12 12 13.798 14.697 12zM20 10.869L18.303 12 20 13.131V10.87zM19.197 9L13 4.869v3.596l3.5 2.333L19.197 9zM7.5 10.798L11 8.465V4.869L4.803 9 7.5 10.798zM4.803 15L11 19.131v-3.596l-3.5-2.333L4.803 15zM4 13.131L5.697 12 4 10.869v2.262zM2 9a1 1 0 0 1 .445-.832l9-6a1 1 0 0 1 1.11 0l9 6A1 1 0 0 1 22 9v6a1 1 0 0 1-.445.832l-9 6a1 1 0 0 1-1.11 0l-9-6A1 1 0 0 1 2 15V9z"/></symbol><symbol id="close-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></symbol><symbol id="menu-icon" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0z"/><path d="M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"/></symbol></defs></svg></head><body data-theme="light"><div class="sidebar-container"><div class="sidebar" id="sidebar"><a href="/" class="sidebar-title sidebar-title-anchor">Dobo API</a><div class="sidebar-items-container"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Dobo.html">Dobo</a></div><div class="sidebar-section-children"><a href="DoboAction.html">DoboAction</a></div><div class="sidebar-section-children"><a href="DoboAdapter.html">DoboAdapter</a></div><div class="sidebar-section-children"><a href="DoboConnection.html">DoboConnection</a></div><div class="sidebar-section-children"><a href="DoboFeature.html">DoboFeature</a></div><div class="sidebar-section-children"><a href="DoboModel.html">DoboModel</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-Helper.html">Helper</a></div><div class="sidebar-section-children"><a href="module-Helper_Model.html">Helper/Model</a></div><div class="sidebar-section-children"><a href="module-Hook.html">Hook</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-externals"><div>Externals</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="external-Tools.html">Tools</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#actionFactory">actionFactory</a></div><div class="sidebar-section-children"><a href="global.html#adapterFactory">adapterFactory</a></div><div class="sidebar-section-children"><a href="global.html#connectionFactory">connectionFactory</a></div><div class="sidebar-section-children"><a href="global.html#featureFactory">featureFactory</a></div><div class="sidebar-section-children"><a href="global.html#modelFactory">modelFactory</a></div><div class="sidebar-section-children"><a href="global.html#pluginFactory">pluginFactory</a></div></div></div></div></div><div class="navbar-container" id="VuAckcnZhf"><nav class="navbar"><div class="navbar-left-items"><div class="navbar-item"><a id="" href="https://www.npmjs.com/package/dobo" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/dobo" target="">Github</a></div><div class="navbar-item"><a id="" href="https://dobo.bajo.app/" target="">Dobo</a></div><div class="navbar-item"><a id="" href="https://bajo.app/" target="">Bajo</a></div></div><div class="navbar-right-items"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div><nav></nav></nav></div><div class="toc-container"><div class="toc-content"><span class="bold">On this page</span><div id="eed4d2a0bfd64539bb9df78095dec881"></div></div></div><div class="body-wrapper"><div class="main-content"><div class="main-wrapper"><section><header><h1 id="Tools-title" class="has-anchor">Tools</h1></header><article><div class="container-overview"><dl class="details"><div class="details-item-container"><dt class="tag-source bold">Source</dt><dd class="tag-source"><ul><li><a href="lib_factory_adapter.js.html">lib/factory/adapter.js</a>, <a href="lib_factory_adapter.js.html#line13">line 13</a></li></ul></dd></div><div class="details-item-container"><dt class="tag-see bold">See</dt><dd class="tag-see"><ul><li><a href="https://ardhi.github.io/bajo/Tools.html">Bajo Tools</a></li></ul></dd></div></dl></div></article></section></div></div></div><div class="search-container" id="PkfLWpAbet" style="display:none"><div class="wrapper" id="iCxFxjkHbP"><button class="icon-button search-close-button" id="VjLlGakifb" aria-label="close search"><svg><use xlink:href="#close-icon"></use></svg></button><div class="search-box-c"><svg><use xlink:href="#search-icon"></use></svg> <input type="text" id="vpcKVYIppa" class="search-input" placeholder="Search..." autofocus></div><div class="search-result-c" id="fWwVHRuDuN"><span class="search-result-c-text">Type anything to view search result</span></div></div></div><div class="mobile-menu-icon-container"><button class="icon-button" id="mobile-menu" data-isopen="false" aria-label="menu"><svg><use xlink:href="#menu-icon"></use></svg></button></div><div id="mobile-sidebar" class="mobile-sidebar-container"><div class="mobile-sidebar-wrapper"><a href="/" class="sidebar-title sidebar-title-anchor">Dobo API</a><div class="mobile-nav-links"><div class="navbar-item"><a id="" href="https://www.npmjs.com/package/dobo" target="">NPM</a></div><div class="navbar-item"><a id="" href="https://github.com/ardhi/dobo" target="">Github</a></div><div class="navbar-item"><a id="" href="https://dobo.bajo.app/" target="">Dobo</a></div><div class="navbar-item"><a id="" href="https://bajo.app/" target="">Bajo</a></div></div><div class="mobile-sidebar-items-c"><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-classes"><div>Classes</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="Dobo.html">Dobo</a></div><div class="sidebar-section-children"><a href="DoboAction.html">DoboAction</a></div><div class="sidebar-section-children"><a href="DoboAdapter.html">DoboAdapter</a></div><div class="sidebar-section-children"><a href="DoboConnection.html">DoboConnection</a></div><div class="sidebar-section-children"><a href="DoboFeature.html">DoboFeature</a></div><div class="sidebar-section-children"><a href="DoboModel.html">DoboModel</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-modules"><div>Modules</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="module-Helper.html">Helper</a></div><div class="sidebar-section-children"><a href="module-Helper_Model.html">Helper/Model</a></div><div class="sidebar-section-children"><a href="module-Hook.html">Hook</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-externals"><div>Externals</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="external-Tools.html">Tools</a></div></div><div class="sidebar-section-title with-arrow" data-isopen="false" id="sidebar-global"><div>Global</div><svg><use xlink:href="#down-icon"></use></svg></div><div class="sidebar-section-children-container"><div class="sidebar-section-children"><a href="global.html#actionFactory">actionFactory</a></div><div class="sidebar-section-children"><a href="global.html#adapterFactory">adapterFactory</a></div><div class="sidebar-section-children"><a href="global.html#connectionFactory">connectionFactory</a></div><div class="sidebar-section-children"><a href="global.html#featureFactory">featureFactory</a></div><div class="sidebar-section-children"><a href="global.html#modelFactory">modelFactory</a></div><div class="sidebar-section-children"><a href="global.html#pluginFactory">pluginFactory</a></div></div></div><div class="mobile-navbar-actions"><div class="navbar-right-item"><button class="icon-button search-button" aria-label="open-search"><svg><use xlink:href="#search-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button theme-toggle" aria-label="toggle-theme"><svg><use class="theme-svg-use" xlink:href="#dark-theme-icon"></use></svg></button></div><div class="navbar-right-item"><button class="icon-button font-size" aria-label="change-font-size"><svg><use xlink:href="#font-size-icon"></use></svg></button></div></div></div></div><script type="text/javascript" src="scripts/core.min.js"></script><script src="scripts/search.min.js" defer="defer"></script><script src="scripts/third-party/fuse.js" defer="defer"></script><script type="text/javascript">var tocbotInstance=tocbot.init({tocSelector:"#eed4d2a0bfd64539bb9df78095dec881",contentSelector:".main-content",headingSelector:"h1, h2, h3",hasInnerContainers:!0,scrollContainer:".main-content",headingsOffset:130,onClick:bringLinkToView})</script></body></html>