You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ff21611
Browse filesBrowse the repository at this point in the historyBrowse files
count: sql<number>`coalesce(sum(case when ${V1InputTable.state} = 'pending' then 1 else 0 end), 0)`,
298
+
bytes: sql<number>`coalesce(sum(length(cast(${V1InputTable.payload} as blob)) + coalesce(length(cast(${V1InputTable.images} as blob)), 0) + length(cast(${V1InputTable.receipt} as blob))), 0)`,
// This is the pre-image projector's transaction, bypassing new service-level validation.
80
+
constlegacyPromote=(requestID: string)=>
81
+
db.transaction((tx)=>
82
+
Effect.gen(function*(){
83
+
yield*tx.run(
84
+
sql`INSERT INTO message(id,session_id,time_created,time_updated,data) VALUES (${`msg_${requestID}`},${sessionID},1,1,'{"role":"user"}')`,
85
+
)
86
+
yield*tx.run(
87
+
sql`INSERT INTO part(id,message_id,session_id,time_created,time_updated,data) VALUES (${`prt_${requestID}`},${`msg_${requestID}`},${sessionID},1,1,'{"type":"text","text":"legacy text"}')`,
88
+
)
89
+
yield*tx.run(
90
+
sql`UPDATE v1_session_input SET state='promoted', receipt=json_set(receipt,'$.state','promoted','$.messageID',${`msg_${requestID}`},'$.timePromoted',1) WHERE request_id=${requestID}`,
0 commit comments