sorla-db 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ For the first query version needs only to see if has some non logical operator or non logical comparison to resend to find as a recursive method.
2
+
3
+ - Preparing sort of data using new capabilities
4
+ - improving find behavior
5
+
6
+ For comparison operators and deny operator like not
7
+ adding nor https://www.mongodb.com/docs/manual/reference/operator/query/nor/
8
+
9
+ https://www.mongodb.com/docs/manual/reference/operator/query-comparison/
10
+ https://www.mongodb.com/docs/manual/reference/operator/query/expr/
11
+ https://www.mongodb.com/docs/manual/reference/operator/query/regex/
12
+
13
+
14
+ Preparing a bunch of misc tests to search data, add sort data and create test sortable data.
15
+
16
+ //erros and improvements
17
+ Bugs appears after resolving not, need to check and test why
18
+ npm run test
19
+
20
+ needs to improve projection to use cursor
21
+
22
+ fix new bugs in test
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Sysborg
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # sorla-db
2
+ A simple and temporary database focused to use in browser environment that will bring capabilities for other tools that will be launched as soon as possible.
3
+
4
+ This idea is from our founder #andmarruda that give this idea and alot of this idea are developed by him.
5
+
6
+ To create a minify file run
7
+ ```
8
+ node index.js
9
+ ```
10
+
11
+ To test the environment using jest run...
12
+ Don`t forget to install the dev dependecies before, using:
13
+
14
+ ```
15
+ npm install --only=dev
16
+ ```
17
+
18
+ ```
19
+ npm test
20
+ ```
21
+
22
+ Soon some documentations....
23
+
24
+ Prohibited characters $ and .,
25
+ $ because is used to call operators and . because uses to search key inside a object's object
26
+
27
+ ## Find Operators
28
+
29
+ ### $and
30
+
31
+ The **$and** operator meticulously processes arrays, employing a loop chain mechanism. During this process, it's engineered for efficiency: if it encounters any comparison that yields **false**, it immediately halts the ongoing chain. This intelligent design is aimed at preventing unnecessary computation time, especially when dealing with documents that don't meet the specified condition. It's all about optimizing performance and ensuring swift, precise operations.
package/debug-not.js ADDED
@@ -0,0 +1,24 @@
1
+ const sorla = require('./src/sorla.js');
2
+ const helper = require('./src/helper.js');
3
+
4
+ const numberOfObjects = 20;
5
+ const sdb = new sorla();
6
+ sdb.createDb('test');
7
+ sdb.useDb('test');
8
+
9
+ sdb.db.createCollection('collection_test');
10
+
11
+ const objects = helper.createFakeCollection(sdb, 'collection_test', numberOfObjects);
12
+ const [itemIndex1, ] = helper.getRandomComparisonData(objects);
13
+
14
+ const finded = sdb.db.collection_test.find({
15
+ uuid: {
16
+ $not: {
17
+ $eq: itemIndex1.uuid
18
+ }
19
+ }
20
+ });
21
+
22
+ console.log(finded.length, numberOfObjects);
23
+
24
+ //console.log(finded);