@indra.ai/deva.data 0.0.23 → 0.0.24
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/help/corpus.feecting +0 -4
- package/help/main.feecting +10 -4
- package/index.js +2 -5
- package/package.json +20 -14
package/help/corpus.feecting
CHANGED
package/help/main.feecting
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
::BEGIN:MAIN
|
|
1
2
|
# {{profile.name}}
|
|
2
3
|
|
|
3
4
|
{{profile}}
|
|
@@ -7,28 +8,33 @@
|
|
|
7
8
|
## Func
|
|
8
9
|
|
|
9
10
|
### Insert
|
|
11
|
+
|
|
10
12
|
opts: takes in the id, collection, and data for the insert
|
|
13
|
+
|
|
11
14
|
1. opts.id is the id for the packet
|
|
12
15
|
2. opts.collection is the collection that the opts.data will insert
|
|
13
16
|
3. opts.data is the object that holds the data structure to insert.
|
|
14
17
|
|
|
15
18
|
### Update
|
|
16
|
-
|
|
19
|
+
|
|
20
|
+
opts: takes in the id, collection, and data to update in the collection.
|
|
21
|
+
|
|
17
22
|
1. opts.id is the id of the item to update.
|
|
18
23
|
2. opts.collection is the collection to update.
|
|
19
24
|
3. opts.data is the data object to update in the colletion.
|
|
20
25
|
|
|
21
26
|
### List
|
|
27
|
+
|
|
22
28
|
opts: The object to filter the collection for data sorted by created.
|
|
29
|
+
|
|
23
30
|
1. opts.collection is the collection to list items from.
|
|
24
31
|
2. opts.data is the filtering object which includes the limit.
|
|
25
32
|
|
|
26
|
-
### Search
|
|
27
33
|
|
|
28
|
-
opts:
|
|
29
34
|
::begin:hidden
|
|
30
35
|
#color = {{profile.color}}
|
|
31
36
|
#bgcolor = {{profile.bgcolor}}
|
|
32
37
|
#bg = {{profile.background}}
|
|
33
|
-
::end:hidden
|
|
34
38
|
copyright: ©2025 Quinn Michaels
|
|
39
|
+
::end:hidden
|
|
40
|
+
::END:MAIN
|
package/index.js
CHANGED
|
@@ -192,15 +192,13 @@ const DATA = new Deva({
|
|
|
192
192
|
await this.modules.client.connect();
|
|
193
193
|
const db = this.modules.client.db(database);
|
|
194
194
|
const table = db.collection(collection);
|
|
195
|
-
|
|
196
195
|
// await table.dropIndex('a_text_q_text');
|
|
197
196
|
const idx = await table.listIndexes().toArray();
|
|
198
|
-
const hasIdx = idx.find(i => i.name === 'a_q_text')
|
|
197
|
+
const hasIdx = idx.find(i => i.name === 'a_q_text');
|
|
199
198
|
if (!hasIdx) {
|
|
200
199
|
const newIdx = await table.createIndex({"a": "text", "q": "text"}, {name: 'a_q_text'});
|
|
201
200
|
}
|
|
202
|
-
|
|
203
|
-
const query = {$text:{$search:opts.text}};
|
|
201
|
+
const query = {$text:{$search:opts.text}};
|
|
204
202
|
const options = {
|
|
205
203
|
projection: {
|
|
206
204
|
id: 1,
|
|
@@ -210,7 +208,6 @@ const DATA = new Deva({
|
|
|
210
208
|
created: 1
|
|
211
209
|
}
|
|
212
210
|
};
|
|
213
|
-
// db.memory_buddy.find({$text:{$search:"hello"}}, {id: 1,a: 1,q: 1,score:{$meta:"textScore"}}).limit(10)
|
|
214
211
|
result = await table.find(query, options).limit(parseInt(limit)).toArray();
|
|
215
212
|
} finally {
|
|
216
213
|
await this.modules.client.close();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": 4825562571950,
|
|
3
3
|
"name": "@indra.ai/deva.data",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.24",
|
|
5
5
|
"author": "Quinn Michaels",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"copyright": "2025",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"bugs": {
|
|
26
26
|
"url": "https://github.com/indraai/deva.data/issues"
|
|
27
27
|
},
|
|
28
|
-
"homepage": "https://
|
|
28
|
+
"homepage": "https://github.com/indraai/deva.data",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@indra.ai/deva": "^1.5.
|
|
30
|
+
"@indra.ai/deva": "^1.5.35",
|
|
31
31
|
"mongodb": "^6.13.0"
|
|
32
32
|
},
|
|
33
33
|
"data": {
|
|
@@ -51,21 +51,27 @@
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
"profile": {
|
|
54
|
-
"name": "
|
|
54
|
+
"name": "#DataDeva",
|
|
55
|
+
"title": "Data Deva",
|
|
56
|
+
"subtitle": "Managing data in Deva.world.",
|
|
57
|
+
"describe": "Data Deva manages the data in Deva.world. Responsibilities include managing, inserting, updating, searching, and retriving data from the Deva.world systems.",
|
|
58
|
+
"tweet": "Data Deva manages the inserting, updating, searching, and retriving data from the Deva.world systems.",
|
|
59
|
+
"hashtags": "QuinnMichaels,IndraAI,DevaWorld,DataDeva",
|
|
55
60
|
"pronouns": "He, Him",
|
|
56
61
|
"gender": "DEVA",
|
|
62
|
+
"style": "Data Illustrator",
|
|
63
|
+
"voice": "onyx",
|
|
64
|
+
"system": "Deva.world.data",
|
|
65
|
+
"layout": "default",
|
|
66
|
+
"color": "rgb(192,209,226)",
|
|
67
|
+
"bgcolor": "rgb(0,12,24)",
|
|
68
|
+
"emoji": "/assets/devas/data/emoji.png",
|
|
69
|
+
"avatar": "/assets/devas/data/avatar.png",
|
|
70
|
+
"image": "/assets/devas/data/image.png",
|
|
71
|
+
"background": "/assets/devas/data/background.png",
|
|
57
72
|
"owner": "Quinn Michaels",
|
|
58
73
|
"creator": "Quinn Michaels",
|
|
59
|
-
"created": "Sunday, September 17, 2023 - 5:02:05 PM"
|
|
60
|
-
"system": "Deva.world.data",
|
|
61
|
-
"describe": "Data Deva manages the data in Deva.world. Responsibilities include managing, inserting, updating, searching, and retriving data from the Deva.world systems.",
|
|
62
|
-
"emoji": "/public/devas/data/emoji.png",
|
|
63
|
-
"avatar": "/public/devas/data/avatar.png",
|
|
64
|
-
"background": "/public/devas/data/background.png",
|
|
65
|
-
"color": "#c0d1e2",
|
|
66
|
-
"bgcolor": "#000c18",
|
|
67
|
-
"voice": "onyx",
|
|
68
|
-
"style": "Data Illustrator"
|
|
74
|
+
"created": "Sunday, September 17, 2023 - 5:02:05 PM"
|
|
69
75
|
}
|
|
70
76
|
},
|
|
71
77
|
"vars": {
|