@@ -216,21 +216,21 @@ type GetAllChatMessagesRow = {
216
216
217
217
let GetAllChatMessages ( db : NpgsqlConnection ) () =
218
218
let reader = fun ( read : RowReader ) -> {
219
- Id = read.int " Id "
220
- Uuid = read.string " Uuid "
221
- ChatSessionUuid = read.string " ChatSessionUuid "
222
- Role = read.string " Role "
223
- Content = read.string " Content "
224
- Score = read.double " Score "
225
- UserId = read.int " UserId "
226
- CreatedAt = read.dateTime " CreatedAt "
227
- UpdatedAt = read.dateTime " UpdatedAt "
228
- CreatedBy = read.int " CreatedBy "
229
- UpdatedBy = read.int " UpdatedBy "
230
- IsDeleted = read.bool " IsDeleted "
231
- IsPin = read.bool " IsPin "
232
- TokenCount = read.int " TokenCount "
233
- Raw = read.string " Raw " }
219
+ Id = read.int " id "
220
+ Uuid = read.string " uuid "
221
+ ChatSessionUuid = read.string " chat_session_uuid "
222
+ Role = read.string " role "
223
+ Content = read.string " content "
224
+ Score = read.double " score "
225
+ UserId = read.int " user_id "
226
+ CreatedAt = read.dateTime " created_at "
227
+ UpdatedAt = read.dateTime " updated_at "
228
+ CreatedBy = read.int " created_by "
229
+ UpdatedBy = read.int " updated_by "
230
+ IsDeleted = read.bool " is_deleted "
231
+ IsPin = read.bool " is_pin "
232
+ TokenCount = read.int " token_count "
233
+ Raw = read.string " raw " }
234
234
db
235
235
|> Sql.existingConnection
236
236
|> Sql.query getAllChatMessages
@@ -480,21 +480,21 @@ type GetChatMessagesBySessionUUIDRow = {
480
480
481
481
let GetChatMessagesBySessionUUID ( db : NpgsqlConnection ) ( arg : GetChatMessagesBySessionUUIDParams ) =
482
482
let reader = fun ( read : RowReader ) -> {
483
- Id = read.int " Id "
484
- Uuid = read.string " Uuid "
485
- ChatSessionUuid = read.string " ChatSessionUuid "
486
- Role = read.string " Role "
487
- Content = read.string " Content "
488
- Score = read.double " Score "
489
- UserId = read.int " UserId "
490
- CreatedAt = read.dateTime " CreatedAt "
491
- UpdatedAt = read.dateTime " UpdatedAt "
492
- CreatedBy = read.int " CreatedBy "
493
- UpdatedBy = read.int " UpdatedBy "
494
- IsDeleted = read.bool " IsDeleted "
495
- IsPin = read.bool " IsPin "
496
- TokenCount = read.int " TokenCount "
497
- Raw = read.string " Raw " }
483
+ Id = read.int " id "
484
+ Uuid = read.string " uuid "
485
+ ChatSessionUuid = read.string " chat_session_uuid "
486
+ Role = read.string " role "
487
+ Content = read.string " content "
488
+ Score = read.double " score "
489
+ UserId = read.int " user_id "
490
+ CreatedAt = read.dateTime " created_at "
491
+ UpdatedAt = read.dateTime " updated_at "
492
+ CreatedBy = read.int " created_by "
493
+ UpdatedBy = read.int " updated_by "
494
+ IsDeleted = read.bool " is_deleted "
495
+ IsPin = read.bool " is_pin "
496
+ TokenCount = read.int " token_count "
497
+ Raw = read.string " raw " }
498
498
db
499
499
|> Sql.existingConnection
500
500
|> Sql.query getChatMessagesBySessionUUID
@@ -700,21 +700,21 @@ type GetLastNChatMessagesRow = {
700
700
701
701
let GetLastNChatMessages ( db : NpgsqlConnection ) ( arg : GetLastNChatMessagesParams ) =
702
702
let reader = fun ( read : RowReader ) -> {
703
- Id = read.int " Id "
704
- Uuid = read.string " Uuid "
705
- ChatSessionUuid = read.string " ChatSessionUuid "
706
- Role = read.string " Role "
707
- Content = read.string " Content "
708
- Score = read.double " Score "
709
- UserId = read.int " UserId "
710
- CreatedAt = read.dateTime " CreatedAt "
711
- UpdatedAt = read.dateTime " UpdatedAt "
712
- CreatedBy = read.int " CreatedBy "
713
- UpdatedBy = read.int " UpdatedBy "
714
- IsDeleted = read.bool " IsDeleted "
715
- IsPin = read.bool " IsPin "
716
- TokenCount = read.int " TokenCount "
717
- Raw = read.string " Raw " }
703
+ Id = read.int " id "
704
+ Uuid = read.string " uuid "
705
+ ChatSessionUuid = read.string " chat_session_uuid "
706
+ Role = read.string " role "
707
+ Content = read.string " content "
708
+ Score = read.double " score "
709
+ UserId = read.int " user_id "
710
+ CreatedAt = read.dateTime " created_at "
711
+ UpdatedAt = read.dateTime " updated_at "
712
+ CreatedBy = read.int " created_by "
713
+ UpdatedBy = read.int " updated_by "
714
+ IsDeleted = read.bool " is_deleted "
715
+ IsPin = read.bool " is_pin "
716
+ TokenCount = read.int " token_count "
717
+ Raw = read.string " raw " }
718
718
db
719
719
|> Sql.existingConnection
720
720
|> Sql.query getLastNChatMessages
@@ -775,21 +775,21 @@ type GetLatestMessagesBySessionUUIDRow = {
775
775
776
776
let GetLatestMessagesBySessionUUID ( db : NpgsqlConnection ) ( arg : GetLatestMessagesBySessionUUIDParams ) =
777
777
let reader = fun ( read : RowReader ) -> {
778
- Id = read.int " Id "
779
- Uuid = read.string " Uuid "
780
- ChatSessionUuid = read.string " ChatSessionUuid "
781
- Role = read.string " Role "
782
- Content = read.string " Content "
783
- Score = read.double " Score "
784
- UserId = read.int " UserId "
785
- CreatedAt = read.dateTime " CreatedAt "
786
- UpdatedAt = read.dateTime " UpdatedAt "
787
- CreatedBy = read.int " CreatedBy "
788
- UpdatedBy = read.int " UpdatedBy "
789
- IsDeleted = read.bool " IsDeleted "
790
- IsPin = read.bool " IsPin "
791
- TokenCount = read.int " TokenCount "
792
- Raw = read.string " Raw " }
778
+ Id = read.int " id "
779
+ Uuid = read.string " uuid "
780
+ ChatSessionUuid = read.string " chat_session_uuid "
781
+ Role = read.string " role "
782
+ Content = read.string " content "
783
+ Score = read.double " score "
784
+ UserId = read.int " user_id "
785
+ CreatedAt = read.dateTime " created_at "
786
+ UpdatedAt = read.dateTime " updated_at "
787
+ CreatedBy = read.int " created_by "
788
+ UpdatedBy = read.int " updated_by "
789
+ IsDeleted = read.bool " is_deleted "
790
+ IsPin = read.bool " is_pin "
791
+ TokenCount = read.int " token_count "
792
+ Raw = read.string " raw " }
793
793
db
794
794
|> Sql.existingConnection
795
795
|> Sql.query getLatestMessagesBySessionUUID
0 commit comments