@salesforce/lds-store-sql 1.100.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +82 -0
- package/dist/SqliteStore.d.ts +61 -0
- package/dist/SqliteStore.js +2 -0
- package/dist/SqliteStore.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +27 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Terms of Use
|
|
2
|
+
|
|
3
|
+
Copyright 2022 Salesforce, Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
These Terms of Use govern the download, installation, and/or use of this
|
|
6
|
+
software provided by Salesforce, Inc. ("Salesforce") (the "Software"), were
|
|
7
|
+
last updated on April 15, 2022, and constitute a legally binding
|
|
8
|
+
agreement between you and Salesforce. If you do not agree to these Terms of
|
|
9
|
+
Use, do not install or use the Software.
|
|
10
|
+
|
|
11
|
+
Salesforce grants you a worldwide, non-exclusive, no-charge, royalty-free
|
|
12
|
+
copyright license to reproduce, prepare derivative works of, publicly
|
|
13
|
+
display, publicly perform, sublicense, and distribute the Software and
|
|
14
|
+
derivative works subject to these Terms. These Terms shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
Subject to the limited rights expressly granted hereunder, Salesforce
|
|
18
|
+
reserves all rights, title, and interest in and to all intellectual
|
|
19
|
+
property subsisting in the Software. No rights are granted to you hereunder
|
|
20
|
+
other than as expressly set forth herein. Users residing in countries on
|
|
21
|
+
the United States Office of Foreign Assets Control sanction list, or which
|
|
22
|
+
are otherwise subject to a US export embargo, may not use the Software.
|
|
23
|
+
|
|
24
|
+
Implementation of the Software may require development work, for which you
|
|
25
|
+
are responsible. The Software may contain bugs, errors and
|
|
26
|
+
incompatibilities and is made available on an AS IS basis without support,
|
|
27
|
+
updates, or service level commitments.
|
|
28
|
+
|
|
29
|
+
Salesforce reserves the right at any time to modify, suspend, or
|
|
30
|
+
discontinue, the Software (or any part thereof) with or without notice. You
|
|
31
|
+
agree that Salesforce shall not be liable to you or to any third party for
|
|
32
|
+
any modification, suspension, or discontinuance.
|
|
33
|
+
|
|
34
|
+
You agree to defend Salesforce against any claim, demand, suit or
|
|
35
|
+
proceeding made or brought against Salesforce by a third party arising out
|
|
36
|
+
of or accruing from (a) your use of the Software, and (b) any application
|
|
37
|
+
you develop with the Software that infringes any copyright, trademark,
|
|
38
|
+
trade secret, trade dress, patent, or other intellectual property right of
|
|
39
|
+
any person or defames any person or violates their rights of publicity or
|
|
40
|
+
privacy (each a "Claim Against Salesforce"), and will indemnify Salesforce
|
|
41
|
+
from any damages, attorney fees, and costs finally awarded against
|
|
42
|
+
Salesforce as a result of, or for any amounts paid by Salesforce under a
|
|
43
|
+
settlement approved by you in writing of, a Claim Against Salesforce,
|
|
44
|
+
provided Salesforce (x) promptly gives you written notice of the Claim
|
|
45
|
+
Against Salesforce, (y) gives you sole control of the defense and
|
|
46
|
+
settlement of the Claim Against Salesforce (except that you may not settle
|
|
47
|
+
any Claim Against Salesforce unless it unconditionally releases Salesforce
|
|
48
|
+
of all liability), and (z) gives you all reasonable assistance, at your
|
|
49
|
+
expense.
|
|
50
|
+
|
|
51
|
+
WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE SOFTWARE IS NOT
|
|
52
|
+
SUPPORTED AND IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
53
|
+
IMPLIED. IN NO EVENT SHALL SALESFORCE HAVE ANY LIABILITY FOR ANY DAMAGES,
|
|
54
|
+
INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
|
|
55
|
+
PUNITIVE, OR CONSEQUENTIAL DAMAGES, OR DAMAGES BASED ON LOST PROFITS, DATA,
|
|
56
|
+
OR USE, IN CONNECTION WITH THE SOFTWARE, HOWEVER CAUSED AND WHETHER IN
|
|
57
|
+
CONTRACT, TORT, OR UNDER ANY OTHER THEORY OF LIABILITY, WHETHER OR NOT YOU
|
|
58
|
+
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
59
|
+
|
|
60
|
+
These Terms of Use shall be governed exclusively by the internal laws of
|
|
61
|
+
the State of California, without regard to its conflicts of laws
|
|
62
|
+
rules. Each party hereby consents to the exclusive jurisdiction of the
|
|
63
|
+
state and federal courts located in San Francisco County, California to
|
|
64
|
+
adjudicate any dispute arising out of or relating to these Terms of Use and
|
|
65
|
+
the download, installation, and/or use of the Software. Except as expressly
|
|
66
|
+
stated herein, these Terms of Use constitute the entire agreement between
|
|
67
|
+
the parties, and supersede all prior and contemporaneous agreements,
|
|
68
|
+
proposals, or representations, written or oral, concerning their subject
|
|
69
|
+
matter. No modification, amendment, or waiver of any provision of these
|
|
70
|
+
Terms of Use shall be effective unless it is by an update to these Terms of
|
|
71
|
+
Use that Salesforce makes available, or is in writing and signed by the
|
|
72
|
+
party against whom the modification, amendment, or waiver is to be
|
|
73
|
+
asserted.
|
|
74
|
+
|
|
75
|
+
Data Privacy: Salesforce may collect, process, and store device,
|
|
76
|
+
system, and other information related to your use of the Software. This
|
|
77
|
+
information includes, but is not limited to, IP address, user metrics, and
|
|
78
|
+
other data ("Usage Data"). Salesforce may use Usage Data for analytics,
|
|
79
|
+
product development, and marketing purposes. You acknowledge that files
|
|
80
|
+
generated in conjunction with the Software may contain sensitive or
|
|
81
|
+
confidential data, and you are solely responsible for anonymizing and
|
|
82
|
+
protecting such data.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The type of scalar values supported by SqliteStore.
|
|
3
|
+
*
|
|
4
|
+
* This is a subset of all types supported by Sqlite itself, but
|
|
5
|
+
* may expand in the future if more types need to be used in LDS.
|
|
6
|
+
*/
|
|
7
|
+
export type SqliteType = string | number | null;
|
|
8
|
+
/**
|
|
9
|
+
* A result from executing a query against a SqliteStore.
|
|
10
|
+
*
|
|
11
|
+
* This type is a compromise between efficiency and ergonomics
|
|
12
|
+
* that hopefully strikes a good balance. It includes the column
|
|
13
|
+
* names in the result but avoids duplicating them for every row
|
|
14
|
+
* in the result set. Rows are packed as an array of arrays of
|
|
15
|
+
* values.
|
|
16
|
+
*
|
|
17
|
+
* Each row array is expected to contain the same number of values
|
|
18
|
+
* as the columns array, and the order of items in a row corresponds
|
|
19
|
+
* to the order in the columns array.
|
|
20
|
+
*/
|
|
21
|
+
export interface SqliteResult {
|
|
22
|
+
columns: string[];
|
|
23
|
+
rows: SqliteType[][];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A `SqliteStore` is a durable store type that is backed by a
|
|
27
|
+
* Sqlite database with a well-known schema.
|
|
28
|
+
*
|
|
29
|
+
* Example implementations of this interface might be a native
|
|
30
|
+
* implementation using SQLCipher, or a browser implementation
|
|
31
|
+
* that uses sqlite.js.
|
|
32
|
+
*
|
|
33
|
+
* Because all implementations of this interface are known to be
|
|
34
|
+
* powered by Sqlite, the store can safely make use of
|
|
35
|
+
* features such as views, partial indexes, virtual columns, and
|
|
36
|
+
* extensions that are part of Sqlite.
|
|
37
|
+
*/
|
|
38
|
+
export interface SqliteStore {
|
|
39
|
+
/**
|
|
40
|
+
* Generally, all SqliteStore implementations should support raw SQL queries.
|
|
41
|
+
* However, an implementation may choose to return `false` in some cases, e.g.
|
|
42
|
+
* if the schema version at runtime does not match any currently supported or
|
|
43
|
+
* well-known schema revisions.
|
|
44
|
+
*
|
|
45
|
+
* @returns true if the implementation supports SQL evaluation.
|
|
46
|
+
*/
|
|
47
|
+
isEvalSupported(): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Executes the specified query and returns the result.
|
|
50
|
+
*
|
|
51
|
+
* This method will eagerly retrieve all rows of the result set and
|
|
52
|
+
* include them in the returned result object.
|
|
53
|
+
*
|
|
54
|
+
* NOTE: positional parameters are bound first, followed by named parameters.
|
|
55
|
+
*
|
|
56
|
+
* @param sql the sql query to execute
|
|
57
|
+
* @param params an array of positional parameters used in the `sql` query
|
|
58
|
+
* @see sqlite3_exec
|
|
59
|
+
*/
|
|
60
|
+
query(sql: string, params: SqliteType[]): Promise<SqliteResult>;
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SqliteStore.js","sourceRoot":"","sources":["../src/SqliteStore.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SqliteResult, SqliteType, SqliteStore } from './SqliteStore';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salesforce/lds-store-sql",
|
|
3
|
+
"version": "1.100.1",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
+
"description": "Interfaces and classes for evaluating SQL against a store (most commonly a DurableStore)",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"prepare": "yarn build",
|
|
21
|
+
"clean": "rm -rf dist",
|
|
22
|
+
"build": "tsc"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@luvio/environments": "0.135.4"
|
|
26
|
+
}
|
|
27
|
+
}
|