node-query/docs/index.html

3916 lines
97 KiB
HTML
Raw Permalink Normal View History

<!doctype html>
<html>
2014-10-20 16:56:45 -04:00
<head>
<meta charset='utf-8' />
2018-02-12 14:58:50 -05:00
<title>ci-node-query 5.0.0 | Documentation</title>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<link href='assets/bass.css' type='text/css' rel='stylesheet' />
<link href='assets/style.css' type='text/css' rel='stylesheet' />
<link href='assets/github.css' type='text/css' rel='stylesheet' />
2018-02-12 14:58:50 -05:00
<link href='assets/split.css' type='text/css' rel='stylesheet' />
</head>
2018-02-12 14:58:50 -05:00
<body class='documentation m0'>
<div class='flex'>
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
<div class='py1 px2'>
2018-02-12 14:58:50 -05:00
<h3 class='mb0 no-anchor'>ci-node-query</h3>
<div class='mb1'><code>5.0.0</code></div>
<input
placeholder='Filter'
id='filter-input'
2016-07-20 16:33:09 -04:00
class='col12 block input'
type='text' />
<div id='toc'>
2016-07-20 16:33:09 -04:00
<ul class='list-reset h5 py1-ul'>
<li><a
href='#nodequery'
class=" toggle-sibling">
NodeQuery
<span class='icon'></span>
</a>
2016-07-20 16:33:09 -04:00
<div class='toggle-target display-none'>
<ul class='list-reset py1-ul pl1'>
<li class='h5'><span>Instance members</span></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#nodequerygetquery'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#getQuery
</a></li>
</ul>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
</div>
</li>
<li><a
href='#querybuilder'
class=" toggle-sibling">
QueryBuilder
<span class='icon'></span>
</a>
2016-07-20 16:33:09 -04:00
<div class='toggle-target display-none'>
<ul class='list-reset py1-ul pl1'>
<li class='h5'><span>Instance members</span></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderqueryfile'
class='regular pre-open'>
#queryFile
</a></li>
<li><a
href='#querybuilderquery'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#query
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderresetquery'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#resetQuery
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuildertruncate'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#truncate
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderend'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#end
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderselect'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#select
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderfrom'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#from
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderlike'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#like
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuildernotlike'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#notLike
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderorlike'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orLike
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderornotlike'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orNotLike
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderhaving'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#having
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderorhaving'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orHaving
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderwhere'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#where
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderorwhere'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orWhere
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderwhereisnull'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#whereIsNull
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderwhereisnotnull'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#whereIsNotNull
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderorwhereisnull'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orWhereIsNull
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderorwhereisnotnull'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orWhereIsNotNull
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderwherein'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#whereIn
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderorwherein'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orWhereIn
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderwherenotin'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#whereNotIn
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderorwherenotin'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orWhereNotIn
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderset'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#set
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderjoin'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#join
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuildergroupby'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#groupBy
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderorderby'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orderBy
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderlimit'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#limit
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuildergroupstart'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#groupStart
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderorgroupstart'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orGroupStart
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderornotgroupstart'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#orNotGroupStart
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuildergroupend'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#groupEnd
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderget'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#get
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderinsert'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#insert
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderinsertbatch'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#insertBatch
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderupdate'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#update
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuilderupdatebatch'
class='regular pre-open'>
#updateBatch
</a></li>
<li><a
href='#querybuilderdelete'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#delete
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuildergetcompiledselect'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#getCompiledSelect
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuildergetcompiledinsert'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#getCompiledInsert
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuildergetcompiledupdate'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#getCompiledUpdate
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#querybuildergetcompileddelete'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#getCompiledDelete
</a></li>
</ul>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
</div>
</li>
<li><a
href='#result'
class=" toggle-sibling">
Result
<span class='icon'></span>
</a>
2016-07-20 16:33:09 -04:00
<div class='toggle-target display-none'>
<ul class='list-reset py1-ul pl1'>
<li class='h5'><span>Instance members</span></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#resultrowcount'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#rowCount
</a></li>
<li><a
2018-02-12 14:58:50 -05:00
href='#resultcolumncount'
2016-07-20 16:33:09 -04:00
class='regular pre-open'>
#columnCount
</a></li>
</ul>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
</div>
</li>
</ul>
</div>
<div class='mt1 h6 quiet'>
<a href='http://documentation.js.org/reading-documentation.html'>Need help reading this?</a>
</div>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div id='split-right' class='relative overflow-auto height-viewport-100'>
2016-07-20 16:33:09 -04:00
<section class='p2 mb2 clearfix bg-white minishadow'>
<div class='clearfix'>
2016-11-18 22:15:56 -05:00
2016-07-20 16:33:09 -04:00
<h3 class='fl m0' id='nodequery'>
NodeQuery
</h3>
2016-11-18 22:15:56 -05:00
2016-07-20 16:33:09 -04:00
</div>
<p>Class for connection management</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>new NodeQuery(config: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>)</div>
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>config</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">object</a>)</code>
connection parameters
2016-07-20 16:33:09 -04:00
</div>
2016-07-20 16:33:09 -04:00
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='py1 quiet mt1 prose-big'>Instance Members</div>
<div class="clearfix">
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='nodequerygetquery'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>getQuery()</span>
</div>
2016-07-20 16:33:09 -04:00
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Return an existing query builder instance</p>
<div class='pre p1 fill-light mt0'>getQuery(): <a href="#querybuilder">QueryBuilder</a></div>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object
</section>
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
2016-07-20 16:33:09 -04:00
</section>
<section class='p2 mb2 clearfix bg-white minishadow'>
<div class='clearfix'>
2016-11-18 22:15:56 -05:00
2016-07-20 16:33:09 -04:00
<h3 class='fl m0' id='querybuilder'>
QueryBuilder
</h3>
2016-11-18 22:15:56 -05:00
2016-07-20 16:33:09 -04:00
</div>
<p>Main object that builds SQL queries.</p>
<div class='pre p1 fill-light mt0'>new QueryBuilder(Driver: Driver, Adapter: Adapter)</div>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<p>
Extends
QueryBuilderBase
</p>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>Driver</span> <code class='quiet'>(Driver)</code>
The syntax driver for the database
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>Adapter</span> <code class='quiet'>(Adapter)</code>
The database module adapter for running queries
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Instance Members</div>
<div class="clearfix">
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderqueryfile'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>queryFile(file, separator)</span>
</div>
2016-07-20 16:33:09 -04:00
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2018-02-12 14:58:50 -05:00
<p>Run a set of queries from a file</p>
<div class='pre p1 fill-light mt0'>queryFile(file: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, separator: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
<span class='code bold'>file</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code>
The path to the sql file
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
</div>
</div>
<div class='space-bottom0'>
<div>
<span class='code bold'>separator</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>
= <code>&#39;;&#39;</code>)</code>
The character separating each query
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></code>:
The result of all the queries
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
</section>
</div>
</div>
<div class='border-bottom' id='querybuilderquery'>
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>query(sql, params?)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Run an arbitrary sql query. Run as a prepared statement.</p>
<div class='pre p1 fill-light mt0'>query(sql: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>, params: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>?): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></div>
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>sql</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code>
The sql to execute
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>params</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>?)</code>
The query parameters
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a></code>:
2016-11-18 22:15:56 -05:00
Promise with result of query
2016-07-20 16:33:09 -04:00
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderresetquery'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>resetQuery()</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Reset the object state for a new query</p>
<div class='pre p1 fill-light mt0'>resetQuery(): void</div>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code>void</code>:
2016-11-18 22:15:56 -05:00
2016-07-20 16:33:09 -04:00
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuildertruncate'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2016-11-18 22:15:56 -05:00
<span class='code strong strong truncate'>truncate(table)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Empties the selected database table</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>truncate(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>): (void | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>)</div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code>
the name of the table to truncate
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code>(void | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>)</code>:
2016-07-20 16:33:09 -04:00
Returns a promise if no callback is supplied
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderend'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>end()</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Closes the database connection for the current adapter</p>
<div class='pre p1 fill-light mt0'>end(): void</div>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code>void</code>:
2016-11-18 22:15:56 -05:00
2016-07-20 16:33:09 -04:00
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderselect'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>select(fields)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Specify rows to select in the query</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>select(fields: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>fields</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>))</code>
The fields to select from the current table
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
<div class='py1 quiet mt1 prose-big'>Example</div>
<pre class='p1 overflow-auto round fill-light'>query.select(<span class="hljs-string">'foo, bar'</span>); <span class="hljs-comment">// Select multiple fields with a string</span></pre>
<pre class='p1 overflow-auto round fill-light'>query.select([<span class="hljs-string">'foo'</span>, <span class="hljs-string">'bar'</span>]); <span class="hljs-comment">// Select multiple fileds with an array</span></pre>
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderfrom'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>from(tableName)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Specify the database table to select from</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>from(tableName: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>tableName</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The table to use for the current query
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
<div class='py1 quiet mt1 prose-big'>Example</div>
<pre class='p1 overflow-auto round fill-light'>query.from(<span class="hljs-string">'tableName'</span>);</pre>
<pre class='p1 overflow-auto round fill-light'>query.from(<span class="hljs-string">'tableName t'</span>); <span class="hljs-comment">// Select the table with an alias</span></pre>
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderlike'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>like(field, val, pos)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Add a 'like/ and like' clause to the query</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>like(field: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, val: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, pos: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>field</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The name of the field to compare to
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>val</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The value to compare to
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>pos</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>
= <code>both</code>)</code>
The placement of the wildcard character(s): before, after, or both
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuildernotlike'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>notLike(field, val, pos)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Add a 'not like/ and not like' clause to the query</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>notLike(field: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, val: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, pos: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>field</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The name of the field to compare to
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>val</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The value to compare to
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>pos</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>
= <code>both</code>)</code>
The placement of the wildcard character(s): before, after, or both
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderorlike'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>orLike(field, val, pos)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Add an 'or like' clause to the query</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>orLike(field: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, val: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, pos: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>field</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The name of the field to compare to
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>val</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The value to compare to
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>pos</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>
= <code>both</code>)</code>
The placement of the wildcard character(s): before, after, or both
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderornotlike'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>orNotLike(field, val, pos)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Add an 'or not like' clause to the query</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>orNotLike(field: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, val: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, pos: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>field</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The name of the field to compare to
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>val</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The value to compare to
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>pos</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>
= <code>both</code>)</code>
The placement of the wildcard character(s): before, after, or both
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderhaving'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>having(key, val = null)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Add a 'having' clause</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>having(key: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>), val: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)?): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>key</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>))</code>
The name of the field and the comparision operator, or an object
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>val</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)?
= <code>null</code>)</code>
The value to compare if the value of key is a string
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderorhaving'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>orHaving(key, val = null)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Add an 'or having' clause</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>orHaving(key: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>), val: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)?): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>key</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>))</code>
The name of the field and the comparision operator, or an object
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>val</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)?
= <code>null</code>)</code>
The value to compare if the value of key is a string
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderwhere'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>where(key, val?)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Set a 'where' clause</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>where(key: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>), val: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)?): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>key</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>))</code>
The name of the field and the comparision operator, or an object
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>val</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)?)</code>
The value to compare if the value of key is a string
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderorwhere'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>orWhere(key, val?)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Set a 'or where' clause</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>orWhere(key: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>), val: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)?): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>key</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>))</code>
The name of the field and the comparision operator, or an object
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>val</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)?)</code>
The value to compare if the value of key is a string
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderwhereisnull'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>whereIsNull(field)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Select a field that is Null</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>whereIsNull(field: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>field</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The name of the field that has a NULL value
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderwhereisnotnull'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>whereIsNotNull(field)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Specify that a field IS NOT NULL</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>whereIsNotNull(field: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>field</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The name so the field that is not to be null
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderorwhereisnull'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>orWhereIsNull(field)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Field is null prefixed with 'OR'</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>orWhereIsNull(field: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>field</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The name of the field
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderorwhereisnotnull'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>orWhereIsNotNull(field)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Field is not null prefixed with 'OR'</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>orWhereIsNotNull(field: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>field</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The name of the field
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderwherein'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>whereIn(key, values)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Set a 'where in' clause</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>whereIn(key: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, values: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>key</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
the field to search
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>values</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)</code>
the array of items to search in
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderorwherein'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>orWhereIn(key, values)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Set a 'or where in' clause</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>orWhereIn(key: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, values: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>key</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
the field to search
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>values</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)</code>
the array of items to search in
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderwherenotin'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>whereNotIn(key, values)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Set a 'where not in' clause</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>whereNotIn(key: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, values: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>key</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
the field to search
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>values</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)</code>
the array of items to search in
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderorwherenotin'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>orWhereNotIn(key, values)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2016-11-18 22:15:56 -05:00
<p>Set a 'or where not in' clause</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>orWhereNotIn(key: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, values: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>key</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
the field to search
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>values</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)</code>
the array of items to search in
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderset'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>set(key, val?)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Set values for insertion or updating</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>set(key: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>), val: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>?): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>key</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>))</code>
The key or object to use
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>val</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>?)</code>
The value if using a scalar key
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
<div class='py1 quiet mt1 prose-big'>Example</div>
<pre class='p1 overflow-auto round fill-light'>query.set(<span class="hljs-string">'foo'</span>, <span class="hljs-string">'bar'</span>); <span class="hljs-comment">// Set a key, value pair</span></pre>
2016-11-18 22:15:56 -05:00
<pre class='p1 overflow-auto round fill-light'>query.set({<span class="hljs-attr">foo</span>:<span class="hljs-string">'bar'</span>}); <span class="hljs-comment">// Set with an object</span></pre>
2016-07-20 16:33:09 -04:00
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderjoin'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>join(table, cond, type)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Add a join clause to the query</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>join(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, cond: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, type: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The table you are joining
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>cond</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The join condition.
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>type</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>
= <code>&#39;inner&#39;</code>)</code>
The type of join, which defaults to inner
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuildergroupby'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>groupBy(field)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Group the results by the selected field(s)</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>groupBy(field: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>field</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a> | <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>))</code>
The name of the field to group by
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderorderby'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>orderBy(field, type)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Order the results by the selected field(s)</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>orderBy(field: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, type: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>field</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The field(s) to order by
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>type</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>
= <code>&#39;ASC&#39;</code>)</code>
The order direction, ASC or DESC
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderlimit'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>limit(limit, offset?)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Put a limit on the query</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>limit(limit: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>, offset: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>?): <a href="#querybuilder">QueryBuilder</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>limit</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>)</code>
The maximum number of rows to fetch
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>offset</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>?)</code>
The row number to start from
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuildergroupstart'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>groupStart()</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Adds an open paren to the current query for logical grouping</p>
<div class='pre p1 fill-light mt0'>groupStart(): <a href="#querybuilder">QueryBuilder</a></div>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderorgroupstart'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>orGroupStart()</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Adds an open paren to the current query for logical grouping,
2016-11-18 22:15:56 -05:00
prefixed with 'OR'</p>
2016-07-20 16:33:09 -04:00
<div class='pre p1 fill-light mt0'>orGroupStart(): <a href="#querybuilder">QueryBuilder</a></div>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderornotgroupstart'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>orNotGroupStart()</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Adds an open paren to the current query for logical grouping,
2016-11-18 22:15:56 -05:00
prefixed with 'OR NOT'</p>
2016-07-20 16:33:09 -04:00
<div class='pre p1 fill-light mt0'>orNotGroupStart(): <a href="#querybuilder">QueryBuilder</a></div>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuildergroupend'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>groupEnd()</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Ends a logical grouping started with one of the groupStart methods</p>
<div class='pre p1 fill-light mt0'>groupEnd(): <a href="#querybuilder">QueryBuilder</a></div>
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="#querybuilder">QueryBuilder</a></code>:
The Query Builder object, for chaining
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderget'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>get(table?, limit?, offset?)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Get the results of the compiled query</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>get(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>?, limit: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>?, offset: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>?): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#result">Result</a>></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>?)</code>
The table to select from
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>limit</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>?)</code>
A limit for the query
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>offset</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a>?)</code>
An offset for the query
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#result">Result</a>></code>:
2016-11-18 22:35:21 -05:00
Promise containing the result of the query
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Example</div>
<pre class='p1 overflow-auto round fill-light'>query.get(<span class="hljs-string">'table_name'</span>).then(promiseCallback); <span class="hljs-comment">// Get all the rows in the table</span></pre>
2016-11-18 22:15:56 -05:00
<pre class='p1 overflow-auto round fill-light'>query.get(<span class="hljs-string">'table_name'</span>, <span class="hljs-number">5</span>); <span class="hljs-comment">// Get 5 rows from the table</span></pre>
2016-07-20 16:33:09 -04:00
2016-11-18 22:15:56 -05:00
<pre class='p1 overflow-auto round fill-light'>query.get(); <span class="hljs-comment">// Get the results of a query generated with other methods</span></pre>
2016-07-20 16:33:09 -04:00
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderinsert'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>insert(table, data?)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Run the generated insert query</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>insert(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, data: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#result">Result</a>></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The table to insert into
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>data</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?)</code>
Data to insert, if not already added with the 'set' method
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#result">Result</a>></code>:
2016-11-18 22:35:21 -05:00
Promise containing the result of the query
2016-07-20 16:33:09 -04:00
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderinsertbatch'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2016-11-18 22:15:56 -05:00
<span class='code strong strong truncate'>insertBatch(table, data)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Insert multiple sets of rows at a time</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>insertBatch(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, data: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#result">Result</a>></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The table to insert into
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>data</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)</code>
The array of objects containing data rows to insert
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#result">Result</a>></code>:
2016-11-18 22:35:21 -05:00
Promise containing the result of the query
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Example</div>
2016-11-18 22:15:56 -05:00
<pre class='p1 overflow-auto round fill-light'>query.insertBatch(<span class="hljs-string">'foo'</span>,[{<span class="hljs-attr">id</span>:<span class="hljs-number">1</span>,<span class="hljs-attr">val</span>:<span class="hljs-string">'bar'</span>},{<span class="hljs-attr">id</span>:<span class="hljs-number">2</span>,<span class="hljs-attr">val</span>:<span class="hljs-string">'baz'</span>}])
2016-07-20 16:33:09 -04:00
.then(promiseCallback);</pre>
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderupdate'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>update(table, data?)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Run the generated update query</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>update(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, data: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#result">Result</a>></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The table to insert into
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>data</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?)</code>
Data to insert, if not already added with the 'set' method
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#result">Result</a>></code>:
2016-11-18 22:35:21 -05:00
Promise containing the result of the query
2016-07-20 16:33:09 -04:00
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuilderupdatebatch'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>updateBatch(table, data, updateKey)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
2018-02-12 14:58:50 -05:00
<p>Creates a batch update sql statement</p>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>updateBatch(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, data: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>, updateKey: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The table to update
</div>
</div>
<div class='space-bottom0'>
<div>
<span class='code bold'>data</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)</code>
Batch insert data
</div>
</div>
<div class='space-bottom0'>
<div>
<span class='code bold'>updateKey</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The field in the table to compare against for updating
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></code>:
Number of rows updated
</section>
</div>
</div>
<div class='border-bottom' id='querybuilderdelete'>
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>delete(table, where?)</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Run the generated delete query</p>
<div class='pre p1 fill-light mt0'>delete(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, where: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#result">Result</a>></div>
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
The table to insert into
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>where</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>?)</code>
Where clause for delete statement
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&#x3C;<a href="#result">Result</a>></code>:
2016-11-18 22:35:21 -05:00
Promise containing the result of the query
2016-07-20 16:33:09 -04:00
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuildergetcompiledselect'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>getCompiledSelect(table?, reset)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Return generated select query SQL</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>getCompiledSelect(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>?, reset: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>?)</code>
the name of the table to retrieve from
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>reset</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>
= <code>true</code>)</code>
Whether to reset the query builder so another query can be built
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>:
2016-07-20 16:33:09 -04:00
The compiled sql statement
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuildergetcompiledinsert'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>getCompiledInsert(table, reset)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Return generated insert query SQL</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>getCompiledInsert(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, reset: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
the name of the table to insert into
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>reset</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>
= <code>true</code>)</code>
Whether to reset the query builder so another query can be built
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>:
2016-07-20 16:33:09 -04:00
The compiled sql statement
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuildergetcompiledupdate'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>getCompiledUpdate(table, reset)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Return generated update query SQL</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>getCompiledUpdate(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, reset: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
the name of the table to update
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>reset</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>
= <code>true</code>)</code>
Whether to reset the query builder so another query can be built
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>:
2016-07-20 16:33:09 -04:00
The compiled sql statement
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='querybuildergetcompileddelete'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
2018-02-12 14:58:50 -05:00
<span class='code strong strong truncate'>getCompiledDelete(table, reset)</span>
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Return generated delete query SQL</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>getCompiledDelete(table: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>, reset: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>table</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a>)</code>
the name of the table to delete from
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>reset</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a>
= <code>true</code>)</code>
Whether to reset the query builder so another query can be built
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></code>:
2016-07-20 16:33:09 -04:00
The compiled sql statement
</section>
</div>
</div>
</div>
</section>
<section class='p2 mb2 clearfix bg-white minishadow'>
<div class='clearfix'>
2016-11-18 22:15:56 -05:00
2016-07-20 16:33:09 -04:00
<h3 class='fl m0' id='result'>
Result
</h3>
2016-11-18 22:15:56 -05:00
2016-07-20 16:33:09 -04:00
</div>
<p>Query result object</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>new Result(rows: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>, columns: <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>)</div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Parameters</div>
<div class='prose'>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>rows</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>
= <code>[]</code>)</code>
the data rows of the result
2016-07-20 16:33:09 -04:00
</div>
</div>
<div class='space-bottom0'>
<div>
2018-02-12 14:58:50 -05:00
<span class='code bold'>columns</span> <code class='quiet'>(<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a>
= <code>[]</code>)</code>
the column names in the result
2016-07-20 16:33:09 -04:00
</div>
</div>
</div>
<div class='py1 quiet mt1 prose-big'>Instance Members</div>
<div class="clearfix">
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='resultrowcount'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>rowCount()</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Get the number of rows returned by the query</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>rowCount(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></code>:
2016-07-20 16:33:09 -04:00
the number of rows in the result
</section>
</div>
</div>
2018-02-12 14:58:50 -05:00
<div class='border-bottom' id='resultcolumncount'>
2016-07-20 16:33:09 -04:00
<div class="clearfix small pointer toggle-sibling">
<div class="py1 contain">
<a class='icon pin-right py1 dark-link caret-right'></a>
<span class='code strong strong truncate'>columnCount()</span>
</div>
</div>
<div class="clearfix display-none toggle-target">
<section class='p2 mb2 clearfix bg-white minishadow'>
<p>Get the number of columns returned by the query</p>
2018-02-12 14:58:50 -05:00
<div class='pre p1 fill-light mt0'>columnCount(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></div>
2016-07-20 16:33:09 -04:00
2018-02-12 14:58:50 -05:00
2016-07-20 16:33:09 -04:00
<div class='py1 quiet mt1 prose-big'>Returns</div>
2018-02-12 14:58:50 -05:00
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number">Number</a></code>:
2016-07-20 16:33:09 -04:00
the number of columns in the result
</section>
</div>
</div>
</div>
</section>
</div>
</div>
<script src='assets/anchor.js'></script>
2018-02-12 14:58:50 -05:00
<script src='assets/split.js'></script>
<script src='assets/site.js'></script>
2014-10-20 16:56:45 -04:00
</body>
</html>