{"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>"}]}