@absolutejs/voice 0.0.22-beta.667 → 0.0.22-beta.668
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/dist/drizzle/index.js +6 -5
- package/package.json +1 -1
package/dist/drizzle/index.js
CHANGED
|
@@ -259,12 +259,13 @@ var voiceDocumentTable = (name) => pgTable2(name, {
|
|
|
259
259
|
});
|
|
260
260
|
var createVoiceDrizzleRecordStore = (input) => {
|
|
261
261
|
const get = async (id) => {
|
|
262
|
-
const rows = await input.db.select({ payload: input.table.payload }).from(input.table).where(eq2(input.table.id, id)).limit(1);
|
|
263
|
-
|
|
262
|
+
const rows = await input.db.select({ id: input.table.id, payload: input.table.payload }).from(input.table).where(eq2(input.table.id, id)).limit(1);
|
|
263
|
+
const row = rows[0];
|
|
264
|
+
return row === undefined ? undefined : input.decorate(row.id, row.payload);
|
|
264
265
|
};
|
|
265
266
|
const list = async () => {
|
|
266
|
-
const rows = await input.db.select({ payload: input.table.payload }).from(input.table).orderBy(desc2(input.table.sortAt), desc2(input.table.id));
|
|
267
|
-
return rows.map((row) => row.payload);
|
|
267
|
+
const rows = await input.db.select({ id: input.table.id, payload: input.table.payload }).from(input.table).orderBy(desc2(input.table.sortAt), desc2(input.table.id));
|
|
268
|
+
return rows.map((row) => input.decorate(row.id, row.payload));
|
|
268
269
|
};
|
|
269
270
|
const set = async (id, value) => {
|
|
270
271
|
const decorated = input.decorate(id, value);
|
|
@@ -2911,7 +2912,7 @@ var createDrizzleExternalObjectMapStore = (db) => {
|
|
|
2911
2912
|
var createDrizzleTraceEventStore = (db) => {
|
|
2912
2913
|
const store = createVoiceDrizzleRecordStore({
|
|
2913
2914
|
db,
|
|
2914
|
-
decorate: (
|
|
2915
|
+
decorate: (id, value) => ({ ...value, id }),
|
|
2915
2916
|
getSortAt: (value) => value.at,
|
|
2916
2917
|
table: voiceTracesTable
|
|
2917
2918
|
});
|