MCPcopy Create free account
hub / github.com/acking-you/static_flow / build_comment_task_batch

Function build_comment_task_batch

crates/store/src/comments_store.rs:971–1062  ·  view source on GitHub ↗
(record: &CommentTaskRecord)

Source from the content-addressed store, hash-verified

969}
970
971fn build_comment_task_batch(record: &CommentTaskRecord) -> Result<RecordBatch> {
972 let mut task_id = StringBuilder::new();
973 let mut article_id = StringBuilder::new();
974 let mut entry_type = StringBuilder::new();
975 let mut status = StringBuilder::new();
976 let mut comment_text = StringBuilder::new();
977 let mut selected_text = StringBuilder::new();
978 let mut anchor_block_id = StringBuilder::new();
979 let mut anchor_context_before = StringBuilder::new();
980 let mut anchor_context_after = StringBuilder::new();
981 let mut reply_to_comment_id = StringBuilder::new();
982 let mut reply_to_comment_text = StringBuilder::new();
983 let mut reply_to_ai_reply_markdown = StringBuilder::new();
984 let mut client_ip = StringBuilder::new();
985 let mut ip_region = StringBuilder::new();
986 let mut fingerprint = StringBuilder::new();
987 let mut ua = StringBuilder::new();
988 let mut language = StringBuilder::new();
989 let mut platform = StringBuilder::new();
990 let mut timezone = StringBuilder::new();
991 let mut viewport = StringBuilder::new();
992 let mut referrer = StringBuilder::new();
993 let mut admin_note = StringBuilder::new();
994 let mut failure_reason = StringBuilder::new();
995 let mut attempt_count = Int32Builder::new();
996 let mut created_at = TimestampMillisecondBuilder::new();
997 let mut updated_at = TimestampMillisecondBuilder::new();
998 let mut approved_at = TimestampMillisecondBuilder::new();
999 let mut completed_at = TimestampMillisecondBuilder::new();
1000
1001 task_id.append_value(&record.task_id);
1002 article_id.append_value(&record.article_id);
1003 entry_type.append_value(&record.entry_type);
1004 status.append_value(&record.status);
1005 comment_text.append_value(&record.comment_text);
1006 selected_text.append_option(record.selected_text.as_deref());
1007 anchor_block_id.append_option(record.anchor_block_id.as_deref());
1008 anchor_context_before.append_option(record.anchor_context_before.as_deref());
1009 anchor_context_after.append_option(record.anchor_context_after.as_deref());
1010 reply_to_comment_id.append_option(record.reply_to_comment_id.as_deref());
1011 reply_to_comment_text.append_option(record.reply_to_comment_text.as_deref());
1012 reply_to_ai_reply_markdown.append_option(record.reply_to_ai_reply_markdown.as_deref());
1013 client_ip.append_value(&record.client_ip);
1014 ip_region.append_value(&record.ip_region);
1015 fingerprint.append_value(&record.fingerprint);
1016 ua.append_option(record.ua.as_deref());
1017 language.append_option(record.language.as_deref());
1018 platform.append_option(record.platform.as_deref());
1019 timezone.append_option(record.timezone.as_deref());
1020 viewport.append_option(record.viewport.as_deref());
1021 referrer.append_option(record.referrer.as_deref());
1022 admin_note.append_option(record.admin_note.as_deref());
1023 failure_reason.append_option(record.failure_reason.as_deref());
1024 attempt_count.append_value(record.attempt_count);
1025 created_at.append_value(record.created_at);
1026 updated_at.append_value(record.updated_at);
1027 append_optional_ts(&mut approved_at, record.approved_at);
1028 append_optional_ts(&mut completed_at, record.completed_at);

Callers 1

Calls 2

comment_task_schemaFunction · 0.85
append_optional_tsFunction · 0.70

Tested by

no test coverage detected