UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 826 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ let n;async function t(){return null==n&&(n=import("./sql/WhereClauseCache.js").then((n=>new n.WhereClauseCache(500,500)))),n}async function e(n,e){const r=await t(),u=r.get(n,e);if(null==u)throw r.getError(n,e);return u}function r(n,t){return n||=null,t||=null,"1=1"===n?t??n:"1=1"===t?n??t:n&&t?`(${n}) AND (${t})`:n??t}function u(n,t){return n||=null,t||=null,"1=1"===n||"1=1"===t||n===t?"1=1"===n?n:t:n&&t?`(${n}) OR (${t})`:n??t}function l(n,t){return 0===t.length?null:`${n} IN (${o(t)})`}function o(n){return n.map((n=>"string"==typeof n?c(n):n)).join(",")}function c(n){return`'${n.replaceAll("'","''")}'`}export{e as parseWhereClause,r as sqlAnd,l as sqlIn,u as sqlOr};