perf: cache public gallery views
This commit is contained in:
@@ -7,7 +7,6 @@ use crate::module_bindings::record_big_fish_play_procedure::record_big_fish_play
|
||||
use crate::module_bindings::remix_big_fish_work_procedure::remix_big_fish_work;
|
||||
use crate::module_bindings::start_big_fish_run_procedure::start_big_fish_run;
|
||||
use crate::module_bindings::submit_big_fish_input_procedure::submit_big_fish_input;
|
||||
use module_big_fish::PUBLIC_BIG_FISH_GALLERY_OWNER_USER_ID;
|
||||
|
||||
impl SpacetimeClient {
|
||||
pub async fn create_big_fish_session(
|
||||
@@ -75,10 +74,29 @@ impl SpacetimeClient {
|
||||
pub async fn list_big_fish_gallery(
|
||||
&self,
|
||||
) -> Result<Vec<BigFishWorkSummaryRecord>, SpacetimeClientError> {
|
||||
self.list_big_fish_works_with_input(BigFishWorksListInput {
|
||||
// 中文注释:公开广场读取只依赖 published_only,但旧部署模块会先校验 owner_user_id 非空。
|
||||
owner_user_id: PUBLIC_BIG_FISH_GALLERY_OWNER_USER_ID.to_string(),
|
||||
published_only: true,
|
||||
self.read_after_connect(move |connection| {
|
||||
let recent_play_counts = public_work_recent_play_counts(connection, "big-fish");
|
||||
let mut items = connection
|
||||
.db()
|
||||
.big_fish_gallery_view()
|
||||
.iter()
|
||||
.collect::<Vec<_>>();
|
||||
items.sort_by(|left, right| {
|
||||
right
|
||||
.updated_at_micros
|
||||
.cmp(&left.updated_at_micros)
|
||||
.then_with(|| left.source_session_id.cmp(&right.source_session_id))
|
||||
});
|
||||
Ok(items
|
||||
.into_iter()
|
||||
.map(|item| {
|
||||
let recent_play_count_7d = recent_play_counts
|
||||
.get(&item.source_session_id)
|
||||
.copied()
|
||||
.unwrap_or(0);
|
||||
map_big_fish_gallery_view_row(item, recent_play_count_7d)
|
||||
})
|
||||
.collect())
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -542,6 +542,10 @@ impl SpacetimeClient {
|
||||
for query in [
|
||||
"SELECT * FROM puzzle_gallery_view",
|
||||
"SELECT * FROM custom_world_gallery_entry",
|
||||
"SELECT * FROM match_3_d_gallery_view",
|
||||
"SELECT * FROM square_hole_gallery_view",
|
||||
"SELECT * FROM visual_novel_gallery_view",
|
||||
"SELECT * FROM big_fish_gallery_view",
|
||||
] {
|
||||
let subscription = self
|
||||
.subscribe_cached_read_model_query(connection, broken.clone(), query, true)
|
||||
@@ -552,6 +556,10 @@ impl SpacetimeClient {
|
||||
for query in [
|
||||
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'puzzle'",
|
||||
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'custom-world'",
|
||||
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'match3d'",
|
||||
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'square-hole'",
|
||||
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'visual-novel'",
|
||||
"SELECT * FROM public_work_play_daily_stat WHERE source_type = 'big-fish'",
|
||||
"SELECT * FROM creation_entry_config",
|
||||
"SELECT * FROM creation_entry_type_config",
|
||||
] {
|
||||
|
||||
@@ -1708,6 +1708,33 @@ pub(crate) fn map_big_fish_works_procedure_result(
|
||||
})
|
||||
}
|
||||
|
||||
pub(crate) fn map_big_fish_gallery_view_row(
|
||||
row: BigFishWorkSummarySnapshot,
|
||||
recent_play_count_7d: u32,
|
||||
) -> BigFishWorkSummaryRecord {
|
||||
BigFishWorkSummaryRecord {
|
||||
work_id: row.work_id,
|
||||
source_session_id: row.source_session_id,
|
||||
owner_user_id: row.owner_user_id,
|
||||
title: row.title,
|
||||
subtitle: row.subtitle,
|
||||
summary: row.summary,
|
||||
cover_image_src: row.cover_image_src,
|
||||
status: row.status,
|
||||
updated_at_micros: row.updated_at_micros,
|
||||
published_at_micros: row.published_at_micros,
|
||||
publish_ready: row.publish_ready,
|
||||
level_count: row.level_count,
|
||||
level_main_image_ready_count: row.level_main_image_ready_count,
|
||||
level_motion_ready_count: row.level_motion_ready_count,
|
||||
background_ready: row.background_ready,
|
||||
play_count: row.play_count,
|
||||
remix_count: row.remix_count,
|
||||
like_count: row.like_count,
|
||||
recent_play_count_7d,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_big_fish_run_procedure_result(
|
||||
result: BigFishRunProcedureResult,
|
||||
) -> Result<BigFishRuntimeRunRecord, SpacetimeClientError> {
|
||||
@@ -3071,6 +3098,16 @@ pub(crate) fn map_puzzle_anchor_pack(snapshot: DomainPuzzleAnchorPack) -> Puzzle
|
||||
}
|
||||
}
|
||||
|
||||
fn map_puzzle_anchor_pack_row(snapshot: PuzzleAnchorPack) -> PuzzleAnchorPackRecord {
|
||||
PuzzleAnchorPackRecord {
|
||||
theme_promise: map_puzzle_anchor_item_row(snapshot.theme_promise),
|
||||
visual_subject: map_puzzle_anchor_item_row(snapshot.visual_subject),
|
||||
visual_mood: map_puzzle_anchor_item_row(snapshot.visual_mood),
|
||||
composition_hooks: map_puzzle_anchor_item_row(snapshot.composition_hooks),
|
||||
tags_and_forbidden: map_puzzle_anchor_item_row(snapshot.tags_and_forbidden),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_puzzle_anchor_item(snapshot: DomainPuzzleAnchorItem) -> PuzzleAnchorItemRecord {
|
||||
PuzzleAnchorItemRecord {
|
||||
key: snapshot.key,
|
||||
@@ -3080,6 +3117,15 @@ pub(crate) fn map_puzzle_anchor_item(snapshot: DomainPuzzleAnchorItem) -> Puzzle
|
||||
}
|
||||
}
|
||||
|
||||
fn map_puzzle_anchor_item_row(snapshot: PuzzleAnchorItem) -> PuzzleAnchorItemRecord {
|
||||
PuzzleAnchorItemRecord {
|
||||
key: snapshot.key,
|
||||
label: snapshot.label,
|
||||
value: snapshot.value,
|
||||
status: format_puzzle_anchor_status(snapshot.status).to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_puzzle_result_draft(
|
||||
snapshot: DomainPuzzleResultDraft,
|
||||
) -> PuzzleResultDraftRecord {
|
||||
@@ -3142,6 +3188,28 @@ pub(crate) fn map_puzzle_draft_level(snapshot: DomainPuzzleDraftLevel) -> Puzzle
|
||||
}
|
||||
}
|
||||
|
||||
fn map_puzzle_draft_level_row(snapshot: PuzzleDraftLevel) -> PuzzleDraftLevelRecord {
|
||||
PuzzleDraftLevelRecord {
|
||||
level_id: snapshot.level_id,
|
||||
level_name: snapshot.level_name,
|
||||
picture_description: snapshot.picture_description,
|
||||
picture_reference: snapshot.picture_reference,
|
||||
ui_background_prompt: snapshot.ui_background_prompt,
|
||||
ui_background_image_src: snapshot.ui_background_image_src,
|
||||
ui_background_image_object_key: snapshot.ui_background_image_object_key,
|
||||
background_music: snapshot.background_music.map(map_puzzle_audio_asset_row),
|
||||
candidates: snapshot
|
||||
.candidates
|
||||
.into_iter()
|
||||
.map(map_puzzle_generated_image_candidate_row)
|
||||
.collect(),
|
||||
selected_candidate_id: snapshot.selected_candidate_id,
|
||||
cover_image_src: snapshot.cover_image_src,
|
||||
cover_asset_id: snapshot.cover_asset_id,
|
||||
generation_status: snapshot.generation_status,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_puzzle_audio_asset(
|
||||
asset: module_puzzle::PuzzleAudioAsset,
|
||||
) -> PuzzleAudioAssetRecord {
|
||||
@@ -3157,6 +3225,19 @@ pub(crate) fn map_puzzle_audio_asset(
|
||||
}
|
||||
}
|
||||
|
||||
fn map_puzzle_audio_asset_row(asset: PuzzleAudioAsset) -> PuzzleAudioAssetRecord {
|
||||
PuzzleAudioAssetRecord {
|
||||
task_id: asset.task_id,
|
||||
provider: asset.provider,
|
||||
asset_object_id: asset.asset_object_id,
|
||||
asset_kind: asset.asset_kind,
|
||||
audio_src: asset.audio_src,
|
||||
prompt: asset.prompt,
|
||||
title: asset.title,
|
||||
updated_at: asset.updated_at,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_puzzle_creator_intent(
|
||||
snapshot: DomainPuzzleCreatorIntent,
|
||||
) -> PuzzleCreatorIntentRecord {
|
||||
@@ -3186,6 +3267,20 @@ pub(crate) fn map_puzzle_generated_image_candidate(
|
||||
}
|
||||
}
|
||||
|
||||
fn map_puzzle_generated_image_candidate_row(
|
||||
snapshot: PuzzleGeneratedImageCandidate,
|
||||
) -> PuzzleGeneratedImageCandidateRecord {
|
||||
PuzzleGeneratedImageCandidateRecord {
|
||||
candidate_id: snapshot.candidate_id,
|
||||
image_src: snapshot.image_src,
|
||||
asset_id: snapshot.asset_id,
|
||||
prompt: snapshot.prompt,
|
||||
actual_prompt: snapshot.actual_prompt,
|
||||
source_type: snapshot.source_type,
|
||||
selected: snapshot.selected,
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_puzzle_agent_message_snapshot(
|
||||
snapshot: DomainPuzzleAgentMessageSnapshot,
|
||||
) -> PuzzleAgentMessageRecord {
|
||||
@@ -3298,6 +3393,32 @@ fn map_match3d_work_snapshot(snapshot: Match3DWorkJsonRecord) -> Match3DWorkProf
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_match3d_gallery_view_row(row: Match3DGalleryViewRow) -> Match3DWorkProfileRecord {
|
||||
Match3DWorkProfileRecord {
|
||||
work_id: row.profile_id.clone(),
|
||||
profile_id: row.profile_id,
|
||||
owner_user_id: row.owner_user_id,
|
||||
source_session_id: empty_string_to_none(row.source_session_id),
|
||||
author_display_name: row.author_display_name,
|
||||
game_name: row.game_name,
|
||||
theme_text: row.theme_text,
|
||||
summary: row.summary_text,
|
||||
tags: row.tags,
|
||||
cover_image_src: empty_string_to_none(row.cover_image_src),
|
||||
cover_asset_id: empty_string_to_none(row.cover_asset_id),
|
||||
reference_image_src: row.reference_image_src,
|
||||
clear_count: row.clear_count,
|
||||
difficulty: row.difficulty,
|
||||
publication_status: normalize_match3d_publication_status(&row.publication_status)
|
||||
.to_string(),
|
||||
play_count: row.play_count,
|
||||
updated_at: format_timestamp_micros(row.updated_at_micros),
|
||||
published_at: row.published_at_micros.map(format_timestamp_micros),
|
||||
publish_ready: row.publish_ready,
|
||||
generated_item_assets_json: row.generated_item_assets_json,
|
||||
}
|
||||
}
|
||||
|
||||
fn map_match3d_run_json(run_json: String) -> Result<Match3DRunRecord, SpacetimeClientError> {
|
||||
let run = serde_json::from_str::<Match3DRunJsonRecord>(&run_json).map_err(|error| {
|
||||
SpacetimeClientError::Runtime(format!("match3d run_json 非法: {error}"))
|
||||
@@ -3523,6 +3644,44 @@ fn map_square_hole_work_snapshot(
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_square_hole_gallery_view_row(
|
||||
row: SquareHoleGalleryViewRow,
|
||||
) -> SquareHoleWorkProfileRecord {
|
||||
SquareHoleWorkProfileRecord {
|
||||
work_id: row.work_id,
|
||||
profile_id: row.profile_id,
|
||||
owner_user_id: row.owner_user_id,
|
||||
source_session_id: empty_string_to_none(row.source_session_id),
|
||||
author_display_name: row.author_display_name,
|
||||
game_name: row.game_name,
|
||||
theme_text: row.theme_text,
|
||||
twist_rule: row.twist_rule,
|
||||
summary: row.summary_text,
|
||||
tags: row.tags,
|
||||
cover_image_src: empty_string_to_none(row.cover_image_src),
|
||||
background_prompt: row.background_prompt,
|
||||
background_image_src: empty_string_to_none(row.background_image_src),
|
||||
shape_options: row
|
||||
.shape_options
|
||||
.into_iter()
|
||||
.map(map_square_hole_shape_option_snapshot)
|
||||
.collect(),
|
||||
hole_options: row
|
||||
.hole_options
|
||||
.into_iter()
|
||||
.map(map_square_hole_hole_option_snapshot)
|
||||
.collect(),
|
||||
shape_count: row.shape_count,
|
||||
difficulty: row.difficulty,
|
||||
publication_status: normalize_square_hole_publication_status(&row.publication_status)
|
||||
.to_string(),
|
||||
play_count: row.play_count,
|
||||
updated_at: format_timestamp_micros(row.updated_at_micros),
|
||||
published_at: row.published_at_micros.map(format_timestamp_micros),
|
||||
publish_ready: row.publish_ready,
|
||||
}
|
||||
}
|
||||
|
||||
fn map_square_hole_run_json(run_json: String) -> Result<SquareHoleRunRecord, SpacetimeClientError> {
|
||||
let run = serde_json::from_str::<SquareHoleRunJsonRecord>(&run_json).map_err(|error| {
|
||||
SpacetimeClientError::Runtime(format!("square hole run_json 非法: {error}"))
|
||||
@@ -3612,6 +3771,31 @@ fn map_square_hole_hole_option(
|
||||
}
|
||||
}
|
||||
|
||||
fn map_square_hole_shape_option_snapshot(
|
||||
snapshot: SquareHoleShapeOptionSnapshot,
|
||||
) -> SquareHoleShapeOptionRecord {
|
||||
SquareHoleShapeOptionRecord {
|
||||
option_id: snapshot.option_id,
|
||||
shape_kind: snapshot.shape_kind,
|
||||
label: snapshot.label,
|
||||
target_hole_id: snapshot.target_hole_id,
|
||||
image_prompt: snapshot.image_prompt,
|
||||
image_src: empty_string_to_none(snapshot.image_src),
|
||||
}
|
||||
}
|
||||
|
||||
fn map_square_hole_hole_option_snapshot(
|
||||
snapshot: SquareHoleHoleOptionSnapshot,
|
||||
) -> SquareHoleHoleOptionRecord {
|
||||
SquareHoleHoleOptionRecord {
|
||||
hole_id: snapshot.hole_id,
|
||||
hole_kind: snapshot.hole_kind,
|
||||
label: snapshot.label,
|
||||
image_prompt: snapshot.image_prompt,
|
||||
image_src: empty_string_to_none(snapshot.image_src),
|
||||
}
|
||||
}
|
||||
|
||||
fn map_square_hole_feedback_snapshot(
|
||||
snapshot: SquareHoleDropFeedbackJsonRecord,
|
||||
) -> SquareHoleDropFeedbackRecord {
|
||||
@@ -3722,6 +3906,31 @@ fn map_visual_novel_work_snapshot(
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_visual_novel_gallery_view_row(
|
||||
row: VisualNovelGalleryViewRow,
|
||||
) -> VisualNovelWorkProfileRecord {
|
||||
VisualNovelWorkProfileRecord {
|
||||
work_id: row.work_id,
|
||||
profile_id: row.profile_id,
|
||||
owner_user_id: row.owner_user_id,
|
||||
source_session_id: row.source_session_id,
|
||||
author_display_name: row.author_display_name,
|
||||
work_title: row.work_title,
|
||||
work_description: row.work_description,
|
||||
tags: row.tags,
|
||||
cover_image_src: row.cover_image_src,
|
||||
source_asset_ids: row.source_asset_ids,
|
||||
// 中文注释:公开列表 view 不暴露完整 draft,详情页仍通过 detail procedure 读取。
|
||||
draft: serde_json::Value::Null,
|
||||
publication_status: row.publication_status,
|
||||
publish_ready: row.publish_ready,
|
||||
play_count: row.play_count,
|
||||
created_at: format_timestamp_micros(row.created_at_micros),
|
||||
updated_at: format_timestamp_micros(row.updated_at_micros),
|
||||
published_at: row.published_at_micros.map(format_timestamp_micros),
|
||||
}
|
||||
}
|
||||
|
||||
fn map_visual_novel_run_snapshot(snapshot: VisualNovelRunJsonRecord) -> VisualNovelRunRecord {
|
||||
VisualNovelRunRecord {
|
||||
run_id: snapshot.run_id,
|
||||
@@ -3790,6 +3999,22 @@ fn normalize_match3d_stage(value: &str) -> &str {
|
||||
}
|
||||
}
|
||||
|
||||
fn format_puzzle_publication_status(value: PuzzlePublicationStatus) -> &'static str {
|
||||
match value {
|
||||
PuzzlePublicationStatus::Draft => "draft",
|
||||
PuzzlePublicationStatus::Published => "published",
|
||||
}
|
||||
}
|
||||
|
||||
fn format_puzzle_anchor_status(value: PuzzleAnchorStatus) -> &'static str {
|
||||
match value {
|
||||
PuzzleAnchorStatus::Missing => "missing",
|
||||
PuzzleAnchorStatus::Inferred => "inferred",
|
||||
PuzzleAnchorStatus::Confirmed => "confirmed",
|
||||
PuzzleAnchorStatus::Locked => "locked",
|
||||
}
|
||||
}
|
||||
|
||||
fn normalize_match3d_publication_status(value: &str) -> &str {
|
||||
match value {
|
||||
"Draft" | "draft" => "draft",
|
||||
@@ -3951,6 +4176,40 @@ pub(crate) fn map_puzzle_work_profile(
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_puzzle_work_profile_row(snapshot: PuzzleWorkProfile) -> PuzzleWorkProfileRecord {
|
||||
PuzzleWorkProfileRecord {
|
||||
work_id: snapshot.work_id,
|
||||
profile_id: snapshot.profile_id,
|
||||
owner_user_id: snapshot.owner_user_id,
|
||||
source_session_id: snapshot.source_session_id,
|
||||
author_display_name: snapshot.author_display_name,
|
||||
work_title: snapshot.work_title,
|
||||
work_description: snapshot.work_description,
|
||||
level_name: snapshot.level_name,
|
||||
summary: snapshot.summary,
|
||||
theme_tags: snapshot.theme_tags,
|
||||
cover_image_src: snapshot.cover_image_src,
|
||||
cover_asset_id: snapshot.cover_asset_id,
|
||||
publication_status: format_puzzle_publication_status(snapshot.publication_status)
|
||||
.to_string(),
|
||||
updated_at: format_timestamp_micros(snapshot.updated_at_micros),
|
||||
published_at: snapshot.published_at_micros.map(format_timestamp_micros),
|
||||
play_count: snapshot.play_count,
|
||||
remix_count: snapshot.remix_count,
|
||||
like_count: snapshot.like_count,
|
||||
recent_play_count_7d: snapshot.recent_play_count_7_d,
|
||||
point_incentive_total_half_points: snapshot.point_incentive_total_half_points,
|
||||
point_incentive_claimed_points: snapshot.point_incentive_claimed_points,
|
||||
publish_ready: snapshot.publish_ready,
|
||||
anchor_pack: map_puzzle_anchor_pack_row(snapshot.anchor_pack),
|
||||
levels: snapshot
|
||||
.levels
|
||||
.into_iter()
|
||||
.map(map_puzzle_draft_level_row)
|
||||
.collect(),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn map_puzzle_run_snapshot(snapshot: DomainPuzzleRunSnapshot) -> PuzzleRunRecord {
|
||||
PuzzleRunRecord {
|
||||
run_id: snapshot.run_id,
|
||||
|
||||
@@ -225,10 +225,22 @@ impl SpacetimeClient {
|
||||
pub async fn list_match3d_gallery(
|
||||
&self,
|
||||
) -> Result<Vec<Match3DWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.list_match3d_works_with_input(Match3DWorksListInput {
|
||||
// 中文注释:公开广场读取只依赖 published_only,owner_user_id 保持非空便于兼容校验。
|
||||
owner_user_id: "match3d-public-gallery".to_string(),
|
||||
published_only: true,
|
||||
self.read_after_connect(move |connection| {
|
||||
let mut items = connection
|
||||
.db()
|
||||
.match_3_d_gallery_view()
|
||||
.iter()
|
||||
.collect::<Vec<_>>();
|
||||
items.sort_by(|left, right| {
|
||||
right
|
||||
.updated_at_micros
|
||||
.cmp(&left.updated_at_micros)
|
||||
.then_with(|| left.profile_id.cmp(&right.profile_id))
|
||||
});
|
||||
Ok(items
|
||||
.into_iter()
|
||||
.map(map_match3d_gallery_view_row)
|
||||
.collect())
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -92,6 +92,7 @@ impl __sdk::__query_builder::HasCols for BigFishCreationSession {
|
||||
pub struct BigFishCreationSessionIxCols {
|
||||
pub owner_user_id: __sdk::__query_builder::IxCol<BigFishCreationSession, String>,
|
||||
pub session_id: __sdk::__query_builder::IxCol<BigFishCreationSession, String>,
|
||||
pub stage: __sdk::__query_builder::IxCol<BigFishCreationSession, BigFishCreationStage>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasIxCols for BigFishCreationSession {
|
||||
@@ -100,6 +101,7 @@ impl __sdk::__query_builder::HasIxCols for BigFishCreationSession {
|
||||
BigFishCreationSessionIxCols {
|
||||
owner_user_id: __sdk::__query_builder::IxCol::new(table_name, "owner_user_id"),
|
||||
session_id: __sdk::__query_builder::IxCol::new(table_name, "session_id"),
|
||||
stage: __sdk::__query_builder::IxCol::new(table_name, "stage"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::big_fish_work_summary_snapshot_type::BigFishWorkSummarySnapshot;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
/// Table handle for the table `big_fish_gallery_view`.
|
||||
///
|
||||
/// Obtain a handle from the [`BigFishGalleryViewTableAccess::big_fish_gallery_view`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.big_fish_gallery_view()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.big_fish_gallery_view().on_insert(...)`.
|
||||
pub struct BigFishGalleryViewTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<BigFishWorkSummarySnapshot>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `big_fish_gallery_view`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait BigFishGalleryViewTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`BigFishGalleryViewTableHandle`], which mediates access to the table `big_fish_gallery_view`.
|
||||
fn big_fish_gallery_view(&self) -> BigFishGalleryViewTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl BigFishGalleryViewTableAccess for super::RemoteTables {
|
||||
fn big_fish_gallery_view(&self) -> BigFishGalleryViewTableHandle<'_> {
|
||||
BigFishGalleryViewTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<BigFishWorkSummarySnapshot>("big_fish_gallery_view"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct BigFishGalleryViewInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct BigFishGalleryViewDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for BigFishGalleryViewTableHandle<'ctx> {
|
||||
type Row = BigFishWorkSummarySnapshot;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = BigFishWorkSummarySnapshot> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
type InsertCallbackId = BigFishGalleryViewInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BigFishGalleryViewInsertCallbackId {
|
||||
BigFishGalleryViewInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: BigFishGalleryViewInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = BigFishGalleryViewDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> BigFishGalleryViewDeleteCallbackId {
|
||||
BigFishGalleryViewDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: BigFishGalleryViewDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table =
|
||||
client_cache.get_or_make_table::<BigFishWorkSummarySnapshot>("big_fish_gallery_view");
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<BigFishWorkSummarySnapshot>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<BigFishWorkSummarySnapshot>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `BigFishWorkSummarySnapshot`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait big_fish_gallery_viewQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `BigFishWorkSummarySnapshot`.
|
||||
fn big_fish_gallery_view(&self) -> __sdk::__query_builder::Table<BigFishWorkSummarySnapshot>;
|
||||
}
|
||||
|
||||
impl big_fish_gallery_viewQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn big_fish_gallery_view(&self) -> __sdk::__query_builder::Table<BigFishWorkSummarySnapshot> {
|
||||
__sdk::__query_builder::Table::new("big_fish_gallery_view")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct BigFishWorkSummarySnapshot {
|
||||
pub work_id: String,
|
||||
pub source_session_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub title: String,
|
||||
pub subtitle: String,
|
||||
pub summary: String,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub status: String,
|
||||
pub updated_at_micros: i64,
|
||||
pub publish_ready: bool,
|
||||
pub level_count: u32,
|
||||
pub level_main_image_ready_count: u32,
|
||||
pub level_motion_ready_count: u32,
|
||||
pub background_ready: bool,
|
||||
pub play_count: u32,
|
||||
pub remix_count: u32,
|
||||
pub like_count: u32,
|
||||
pub recent_play_count_7_d: u32,
|
||||
pub published_at_micros: Option<i64>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for BigFishWorkSummarySnapshot {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `BigFishWorkSummarySnapshot`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct BigFishWorkSummarySnapshotCols {
|
||||
pub work_id: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, String>,
|
||||
pub source_session_id: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, String>,
|
||||
pub title: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, String>,
|
||||
pub subtitle: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, String>,
|
||||
pub summary: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, String>,
|
||||
pub cover_image_src: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, Option<String>>,
|
||||
pub status: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, String>,
|
||||
pub updated_at_micros: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, i64>,
|
||||
pub publish_ready: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, bool>,
|
||||
pub level_count: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, u32>,
|
||||
pub level_main_image_ready_count: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, u32>,
|
||||
pub level_motion_ready_count: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, u32>,
|
||||
pub background_ready: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, bool>,
|
||||
pub play_count: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, u32>,
|
||||
pub remix_count: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, u32>,
|
||||
pub like_count: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, u32>,
|
||||
pub recent_play_count_7_d: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, u32>,
|
||||
pub published_at_micros: __sdk::__query_builder::Col<BigFishWorkSummarySnapshot, Option<i64>>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for BigFishWorkSummarySnapshot {
|
||||
type Cols = BigFishWorkSummarySnapshotCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
BigFishWorkSummarySnapshotCols {
|
||||
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
|
||||
source_session_id: __sdk::__query_builder::Col::new(table_name, "source_session_id"),
|
||||
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
|
||||
title: __sdk::__query_builder::Col::new(table_name, "title"),
|
||||
subtitle: __sdk::__query_builder::Col::new(table_name, "subtitle"),
|
||||
summary: __sdk::__query_builder::Col::new(table_name, "summary"),
|
||||
cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"),
|
||||
status: __sdk::__query_builder::Col::new(table_name, "status"),
|
||||
updated_at_micros: __sdk::__query_builder::Col::new(table_name, "updated_at_micros"),
|
||||
publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"),
|
||||
level_count: __sdk::__query_builder::Col::new(table_name, "level_count"),
|
||||
level_main_image_ready_count: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"level_main_image_ready_count",
|
||||
),
|
||||
level_motion_ready_count: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"level_motion_ready_count",
|
||||
),
|
||||
background_ready: __sdk::__query_builder::Col::new(table_name, "background_ready"),
|
||||
play_count: __sdk::__query_builder::Col::new(table_name, "play_count"),
|
||||
remix_count: __sdk::__query_builder::Col::new(table_name, "remix_count"),
|
||||
like_count: __sdk::__query_builder::Col::new(table_name, "like_count"),
|
||||
recent_play_count_7_d: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"recent_play_count_7_d",
|
||||
),
|
||||
published_at_micros: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"published_at_micros",
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct Match3DGalleryViewRow {
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_session_id: String,
|
||||
pub author_display_name: String,
|
||||
pub game_name: String,
|
||||
pub theme_text: String,
|
||||
pub summary_text: String,
|
||||
pub tags: Vec<String>,
|
||||
pub cover_image_src: String,
|
||||
pub cover_asset_id: String,
|
||||
pub reference_image_src: Option<String>,
|
||||
pub clear_count: u32,
|
||||
pub difficulty: u32,
|
||||
pub publication_status: String,
|
||||
pub publish_ready: bool,
|
||||
pub play_count: u32,
|
||||
pub updated_at_micros: i64,
|
||||
pub published_at_micros: Option<i64>,
|
||||
pub generated_item_assets_json: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for Match3DGalleryViewRow {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `Match3DGalleryViewRow`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct Match3DGalleryViewRowCols {
|
||||
pub profile_id: __sdk::__query_builder::Col<Match3DGalleryViewRow, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::Col<Match3DGalleryViewRow, String>,
|
||||
pub source_session_id: __sdk::__query_builder::Col<Match3DGalleryViewRow, String>,
|
||||
pub author_display_name: __sdk::__query_builder::Col<Match3DGalleryViewRow, String>,
|
||||
pub game_name: __sdk::__query_builder::Col<Match3DGalleryViewRow, String>,
|
||||
pub theme_text: __sdk::__query_builder::Col<Match3DGalleryViewRow, String>,
|
||||
pub summary_text: __sdk::__query_builder::Col<Match3DGalleryViewRow, String>,
|
||||
pub tags: __sdk::__query_builder::Col<Match3DGalleryViewRow, Vec<String>>,
|
||||
pub cover_image_src: __sdk::__query_builder::Col<Match3DGalleryViewRow, String>,
|
||||
pub cover_asset_id: __sdk::__query_builder::Col<Match3DGalleryViewRow, String>,
|
||||
pub reference_image_src: __sdk::__query_builder::Col<Match3DGalleryViewRow, Option<String>>,
|
||||
pub clear_count: __sdk::__query_builder::Col<Match3DGalleryViewRow, u32>,
|
||||
pub difficulty: __sdk::__query_builder::Col<Match3DGalleryViewRow, u32>,
|
||||
pub publication_status: __sdk::__query_builder::Col<Match3DGalleryViewRow, String>,
|
||||
pub publish_ready: __sdk::__query_builder::Col<Match3DGalleryViewRow, bool>,
|
||||
pub play_count: __sdk::__query_builder::Col<Match3DGalleryViewRow, u32>,
|
||||
pub updated_at_micros: __sdk::__query_builder::Col<Match3DGalleryViewRow, i64>,
|
||||
pub published_at_micros: __sdk::__query_builder::Col<Match3DGalleryViewRow, Option<i64>>,
|
||||
pub generated_item_assets_json:
|
||||
__sdk::__query_builder::Col<Match3DGalleryViewRow, Option<String>>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for Match3DGalleryViewRow {
|
||||
type Cols = Match3DGalleryViewRowCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
Match3DGalleryViewRowCols {
|
||||
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
|
||||
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
|
||||
source_session_id: __sdk::__query_builder::Col::new(table_name, "source_session_id"),
|
||||
author_display_name: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"author_display_name",
|
||||
),
|
||||
game_name: __sdk::__query_builder::Col::new(table_name, "game_name"),
|
||||
theme_text: __sdk::__query_builder::Col::new(table_name, "theme_text"),
|
||||
summary_text: __sdk::__query_builder::Col::new(table_name, "summary_text"),
|
||||
tags: __sdk::__query_builder::Col::new(table_name, "tags"),
|
||||
cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"),
|
||||
cover_asset_id: __sdk::__query_builder::Col::new(table_name, "cover_asset_id"),
|
||||
reference_image_src: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"reference_image_src",
|
||||
),
|
||||
clear_count: __sdk::__query_builder::Col::new(table_name, "clear_count"),
|
||||
difficulty: __sdk::__query_builder::Col::new(table_name, "difficulty"),
|
||||
publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"),
|
||||
publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"),
|
||||
play_count: __sdk::__query_builder::Col::new(table_name, "play_count"),
|
||||
updated_at_micros: __sdk::__query_builder::Col::new(table_name, "updated_at_micros"),
|
||||
published_at_micros: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"published_at_micros",
|
||||
),
|
||||
generated_item_assets_json: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"generated_item_assets_json",
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::match_3_d_gallery_view_row_type::Match3DGalleryViewRow;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
/// Table handle for the table `match_3_d_gallery_view`.
|
||||
///
|
||||
/// Obtain a handle from the [`Match3DGalleryViewTableAccess::match_3_d_gallery_view`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.match_3_d_gallery_view()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.match_3_d_gallery_view().on_insert(...)`.
|
||||
pub struct Match3DGalleryViewTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<Match3DGalleryViewRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `match_3_d_gallery_view`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait Match3DGalleryViewTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`Match3DGalleryViewTableHandle`], which mediates access to the table `match_3_d_gallery_view`.
|
||||
fn match_3_d_gallery_view(&self) -> Match3DGalleryViewTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl Match3DGalleryViewTableAccess for super::RemoteTables {
|
||||
fn match_3_d_gallery_view(&self) -> Match3DGalleryViewTableHandle<'_> {
|
||||
Match3DGalleryViewTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<Match3DGalleryViewRow>("match_3_d_gallery_view"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct Match3DGalleryViewInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct Match3DGalleryViewDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for Match3DGalleryViewTableHandle<'ctx> {
|
||||
type Row = Match3DGalleryViewRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = Match3DGalleryViewRow> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
type InsertCallbackId = Match3DGalleryViewInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> Match3DGalleryViewInsertCallbackId {
|
||||
Match3DGalleryViewInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: Match3DGalleryViewInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = Match3DGalleryViewDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> Match3DGalleryViewDeleteCallbackId {
|
||||
Match3DGalleryViewDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: Match3DGalleryViewDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table = client_cache.get_or_make_table::<Match3DGalleryViewRow>("match_3_d_gallery_view");
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<Match3DGalleryViewRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<Match3DGalleryViewRow>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `Match3DGalleryViewRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait match_3_d_gallery_viewQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `Match3DGalleryViewRow`.
|
||||
fn match_3_d_gallery_view(&self) -> __sdk::__query_builder::Table<Match3DGalleryViewRow>;
|
||||
}
|
||||
|
||||
impl match_3_d_gallery_viewQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn match_3_d_gallery_view(&self) -> __sdk::__query_builder::Table<Match3DGalleryViewRow> {
|
||||
__sdk::__query_builder::Table::new("match_3_d_gallery_view")
|
||||
}
|
||||
}
|
||||
@@ -149,6 +149,7 @@ pub mod big_fish_draft_compile_input_type;
|
||||
pub mod big_fish_event_kind_type;
|
||||
pub mod big_fish_event_table;
|
||||
pub mod big_fish_event_type;
|
||||
pub mod big_fish_gallery_view_table;
|
||||
pub mod big_fish_game_draft_type;
|
||||
pub mod big_fish_input_submit_input_type;
|
||||
pub mod big_fish_level_blueprint_type;
|
||||
@@ -170,6 +171,7 @@ pub mod big_fish_session_snapshot_type;
|
||||
pub mod big_fish_work_delete_input_type;
|
||||
pub mod big_fish_work_like_record_input_type;
|
||||
pub mod big_fish_work_remix_input_type;
|
||||
pub mod big_fish_work_summary_snapshot_type;
|
||||
pub mod big_fish_works_list_input_type;
|
||||
pub mod big_fish_works_procedure_result_type;
|
||||
pub mod bind_asset_object_to_entity_and_return_procedure;
|
||||
@@ -411,6 +413,8 @@ pub mod match_3_d_agent_session_row_type;
|
||||
pub mod match_3_d_agent_session_table;
|
||||
pub mod match_3_d_click_item_procedure_result_type;
|
||||
pub mod match_3_d_draft_compile_input_type;
|
||||
pub mod match_3_d_gallery_view_row_type;
|
||||
pub mod match_3_d_gallery_view_table;
|
||||
pub mod match_3_d_run_click_input_type;
|
||||
pub mod match_3_d_run_get_input_type;
|
||||
pub mod match_3_d_run_procedure_result_type;
|
||||
@@ -507,12 +511,18 @@ pub mod puzzle_agent_session_procedure_result_type;
|
||||
pub mod puzzle_agent_session_row_type;
|
||||
pub mod puzzle_agent_session_table;
|
||||
pub mod puzzle_agent_stage_type;
|
||||
pub mod puzzle_anchor_item_type;
|
||||
pub mod puzzle_anchor_pack_type;
|
||||
pub mod puzzle_anchor_status_type;
|
||||
pub mod puzzle_audio_asset_type;
|
||||
pub mod puzzle_draft_compile_input_type;
|
||||
pub mod puzzle_draft_level_type;
|
||||
pub mod puzzle_event_kind_type;
|
||||
pub mod puzzle_event_table;
|
||||
pub mod puzzle_event_type;
|
||||
pub mod puzzle_form_draft_save_input_type;
|
||||
pub mod puzzle_gallery_view_table;
|
||||
pub mod puzzle_generated_image_candidate_type;
|
||||
pub mod puzzle_generated_images_save_input_type;
|
||||
pub mod puzzle_leaderboard_entry_row_type;
|
||||
pub mod puzzle_leaderboard_entry_table;
|
||||
@@ -538,6 +548,7 @@ pub mod puzzle_work_point_incentive_claim_input_type;
|
||||
pub mod puzzle_work_procedure_result_type;
|
||||
pub mod puzzle_work_profile_row_type;
|
||||
pub mod puzzle_work_profile_table;
|
||||
pub mod puzzle_work_profile_type;
|
||||
pub mod puzzle_work_remix_input_type;
|
||||
pub mod puzzle_work_upsert_input_type;
|
||||
pub mod puzzle_works_list_input_type;
|
||||
@@ -738,6 +749,9 @@ pub mod square_hole_agent_session_row_type;
|
||||
pub mod square_hole_agent_session_table;
|
||||
pub mod square_hole_draft_compile_input_type;
|
||||
pub mod square_hole_drop_shape_procedure_result_type;
|
||||
pub mod square_hole_gallery_view_row_type;
|
||||
pub mod square_hole_gallery_view_table;
|
||||
pub mod square_hole_hole_option_snapshot_type;
|
||||
pub mod square_hole_run_drop_input_type;
|
||||
pub mod square_hole_run_get_input_type;
|
||||
pub mod square_hole_run_procedure_result_type;
|
||||
@@ -747,6 +761,7 @@ pub mod square_hole_run_stop_input_type;
|
||||
pub mod square_hole_run_time_up_input_type;
|
||||
pub mod square_hole_runtime_run_row_type;
|
||||
pub mod square_hole_runtime_run_table;
|
||||
pub mod square_hole_shape_option_snapshot_type;
|
||||
pub mod square_hole_work_delete_input_type;
|
||||
pub mod square_hole_work_get_input_type;
|
||||
pub mod square_hole_work_procedure_result_type;
|
||||
@@ -836,6 +851,8 @@ pub mod visual_novel_agent_session_get_input_type;
|
||||
pub mod visual_novel_agent_session_procedure_result_type;
|
||||
pub mod visual_novel_agent_session_row_type;
|
||||
pub mod visual_novel_agent_session_table;
|
||||
pub mod visual_novel_gallery_view_row_type;
|
||||
pub mod visual_novel_gallery_view_table;
|
||||
pub mod visual_novel_history_procedure_result_type;
|
||||
pub mod visual_novel_run_get_input_type;
|
||||
pub mod visual_novel_run_procedure_result_type;
|
||||
@@ -1005,6 +1022,7 @@ pub use big_fish_draft_compile_input_type::BigFishDraftCompileInput;
|
||||
pub use big_fish_event_kind_type::BigFishEventKind;
|
||||
pub use big_fish_event_table::*;
|
||||
pub use big_fish_event_type::BigFishEvent;
|
||||
pub use big_fish_gallery_view_table::*;
|
||||
pub use big_fish_game_draft_type::BigFishGameDraft;
|
||||
pub use big_fish_input_submit_input_type::BigFishInputSubmitInput;
|
||||
pub use big_fish_level_blueprint_type::BigFishLevelBlueprint;
|
||||
@@ -1026,6 +1044,7 @@ pub use big_fish_session_snapshot_type::BigFishSessionSnapshot;
|
||||
pub use big_fish_work_delete_input_type::BigFishWorkDeleteInput;
|
||||
pub use big_fish_work_like_record_input_type::BigFishWorkLikeRecordInput;
|
||||
pub use big_fish_work_remix_input_type::BigFishWorkRemixInput;
|
||||
pub use big_fish_work_summary_snapshot_type::BigFishWorkSummarySnapshot;
|
||||
pub use big_fish_works_list_input_type::BigFishWorksListInput;
|
||||
pub use big_fish_works_procedure_result_type::BigFishWorksProcedureResult;
|
||||
pub use bind_asset_object_to_entity_and_return_procedure::bind_asset_object_to_entity_and_return;
|
||||
@@ -1267,6 +1286,8 @@ pub use match_3_d_agent_session_row_type::Match3DAgentSessionRow;
|
||||
pub use match_3_d_agent_session_table::*;
|
||||
pub use match_3_d_click_item_procedure_result_type::Match3DClickItemProcedureResult;
|
||||
pub use match_3_d_draft_compile_input_type::Match3DDraftCompileInput;
|
||||
pub use match_3_d_gallery_view_row_type::Match3DGalleryViewRow;
|
||||
pub use match_3_d_gallery_view_table::*;
|
||||
pub use match_3_d_run_click_input_type::Match3DRunClickInput;
|
||||
pub use match_3_d_run_get_input_type::Match3DRunGetInput;
|
||||
pub use match_3_d_run_procedure_result_type::Match3DRunProcedureResult;
|
||||
@@ -1363,12 +1384,18 @@ pub use puzzle_agent_session_procedure_result_type::PuzzleAgentSessionProcedureR
|
||||
pub use puzzle_agent_session_row_type::PuzzleAgentSessionRow;
|
||||
pub use puzzle_agent_session_table::*;
|
||||
pub use puzzle_agent_stage_type::PuzzleAgentStage;
|
||||
pub use puzzle_anchor_item_type::PuzzleAnchorItem;
|
||||
pub use puzzle_anchor_pack_type::PuzzleAnchorPack;
|
||||
pub use puzzle_anchor_status_type::PuzzleAnchorStatus;
|
||||
pub use puzzle_audio_asset_type::PuzzleAudioAsset;
|
||||
pub use puzzle_draft_compile_input_type::PuzzleDraftCompileInput;
|
||||
pub use puzzle_draft_level_type::PuzzleDraftLevel;
|
||||
pub use puzzle_event_kind_type::PuzzleEventKind;
|
||||
pub use puzzle_event_table::*;
|
||||
pub use puzzle_event_type::PuzzleEvent;
|
||||
pub use puzzle_form_draft_save_input_type::PuzzleFormDraftSaveInput;
|
||||
pub use puzzle_gallery_view_table::*;
|
||||
pub use puzzle_generated_image_candidate_type::PuzzleGeneratedImageCandidate;
|
||||
pub use puzzle_generated_images_save_input_type::PuzzleGeneratedImagesSaveInput;
|
||||
pub use puzzle_leaderboard_entry_row_type::PuzzleLeaderboardEntryRow;
|
||||
pub use puzzle_leaderboard_entry_table::*;
|
||||
@@ -1394,6 +1421,7 @@ pub use puzzle_work_point_incentive_claim_input_type::PuzzleWorkPointIncentiveCl
|
||||
pub use puzzle_work_procedure_result_type::PuzzleWorkProcedureResult;
|
||||
pub use puzzle_work_profile_row_type::PuzzleWorkProfileRow;
|
||||
pub use puzzle_work_profile_table::*;
|
||||
pub use puzzle_work_profile_type::PuzzleWorkProfile;
|
||||
pub use puzzle_work_remix_input_type::PuzzleWorkRemixInput;
|
||||
pub use puzzle_work_upsert_input_type::PuzzleWorkUpsertInput;
|
||||
pub use puzzle_works_list_input_type::PuzzleWorksListInput;
|
||||
@@ -1594,6 +1622,9 @@ pub use square_hole_agent_session_row_type::SquareHoleAgentSessionRow;
|
||||
pub use square_hole_agent_session_table::*;
|
||||
pub use square_hole_draft_compile_input_type::SquareHoleDraftCompileInput;
|
||||
pub use square_hole_drop_shape_procedure_result_type::SquareHoleDropShapeProcedureResult;
|
||||
pub use square_hole_gallery_view_row_type::SquareHoleGalleryViewRow;
|
||||
pub use square_hole_gallery_view_table::*;
|
||||
pub use square_hole_hole_option_snapshot_type::SquareHoleHoleOptionSnapshot;
|
||||
pub use square_hole_run_drop_input_type::SquareHoleRunDropInput;
|
||||
pub use square_hole_run_get_input_type::SquareHoleRunGetInput;
|
||||
pub use square_hole_run_procedure_result_type::SquareHoleRunProcedureResult;
|
||||
@@ -1603,6 +1634,7 @@ pub use square_hole_run_stop_input_type::SquareHoleRunStopInput;
|
||||
pub use square_hole_run_time_up_input_type::SquareHoleRunTimeUpInput;
|
||||
pub use square_hole_runtime_run_row_type::SquareHoleRuntimeRunRow;
|
||||
pub use square_hole_runtime_run_table::*;
|
||||
pub use square_hole_shape_option_snapshot_type::SquareHoleShapeOptionSnapshot;
|
||||
pub use square_hole_work_delete_input_type::SquareHoleWorkDeleteInput;
|
||||
pub use square_hole_work_get_input_type::SquareHoleWorkGetInput;
|
||||
pub use square_hole_work_procedure_result_type::SquareHoleWorkProcedureResult;
|
||||
@@ -1692,6 +1724,8 @@ pub use visual_novel_agent_session_get_input_type::VisualNovelAgentSessionGetInp
|
||||
pub use visual_novel_agent_session_procedure_result_type::VisualNovelAgentSessionProcedureResult;
|
||||
pub use visual_novel_agent_session_row_type::VisualNovelAgentSessionRow;
|
||||
pub use visual_novel_agent_session_table::*;
|
||||
pub use visual_novel_gallery_view_row_type::VisualNovelGalleryViewRow;
|
||||
pub use visual_novel_gallery_view_table::*;
|
||||
pub use visual_novel_history_procedure_result_type::VisualNovelHistoryProcedureResult;
|
||||
pub use visual_novel_run_get_input_type::VisualNovelRunGetInput;
|
||||
pub use visual_novel_run_procedure_result_type::VisualNovelRunProcedureResult;
|
||||
@@ -2014,6 +2048,7 @@ pub struct DbUpdate {
|
||||
big_fish_asset_slot: __sdk::TableUpdate<BigFishAssetSlot>,
|
||||
big_fish_creation_session: __sdk::TableUpdate<BigFishCreationSession>,
|
||||
big_fish_event: __sdk::TableUpdate<BigFishEvent>,
|
||||
big_fish_gallery_view: __sdk::TableUpdate<BigFishWorkSummarySnapshot>,
|
||||
big_fish_runtime_run: __sdk::TableUpdate<BigFishRuntimeRun>,
|
||||
chapter_progression: __sdk::TableUpdate<ChapterProgression>,
|
||||
creation_entry_config: __sdk::TableUpdate<CreationEntryConfig>,
|
||||
@@ -2030,6 +2065,7 @@ pub struct DbUpdate {
|
||||
inventory_slot: __sdk::TableUpdate<InventorySlot>,
|
||||
match_3_d_agent_message: __sdk::TableUpdate<Match3DAgentMessageRow>,
|
||||
match_3_d_agent_session: __sdk::TableUpdate<Match3DAgentSessionRow>,
|
||||
match_3_d_gallery_view: __sdk::TableUpdate<Match3DGalleryViewRow>,
|
||||
match_3_d_runtime_run: __sdk::TableUpdate<Match3DRuntimeRunRow>,
|
||||
match_3_d_work_profile: __sdk::TableUpdate<Match3DWorkProfileRow>,
|
||||
npc_state: __sdk::TableUpdate<NpcState>,
|
||||
@@ -2054,7 +2090,7 @@ pub struct DbUpdate {
|
||||
puzzle_agent_message: __sdk::TableUpdate<PuzzleAgentMessageRow>,
|
||||
puzzle_agent_session: __sdk::TableUpdate<PuzzleAgentSessionRow>,
|
||||
puzzle_event: __sdk::TableUpdate<PuzzleEvent>,
|
||||
puzzle_gallery_view: __sdk::TableUpdate<PuzzleGalleryViewRow>,
|
||||
puzzle_gallery_view: __sdk::TableUpdate<PuzzleWorkProfile>,
|
||||
puzzle_leaderboard_entry: __sdk::TableUpdate<PuzzleLeaderboardEntryRow>,
|
||||
puzzle_runtime_run: __sdk::TableUpdate<PuzzleRuntimeRunRow>,
|
||||
puzzle_work_profile: __sdk::TableUpdate<PuzzleWorkProfileRow>,
|
||||
@@ -2065,6 +2101,7 @@ pub struct DbUpdate {
|
||||
runtime_snapshot: __sdk::TableUpdate<RuntimeSnapshotRow>,
|
||||
square_hole_agent_message: __sdk::TableUpdate<SquareHoleAgentMessageRow>,
|
||||
square_hole_agent_session: __sdk::TableUpdate<SquareHoleAgentSessionRow>,
|
||||
square_hole_gallery_view: __sdk::TableUpdate<SquareHoleGalleryViewRow>,
|
||||
square_hole_runtime_run: __sdk::TableUpdate<SquareHoleRuntimeRunRow>,
|
||||
square_hole_work_profile: __sdk::TableUpdate<SquareHoleWorkProfileRow>,
|
||||
story_event: __sdk::TableUpdate<StoryEvent>,
|
||||
@@ -2076,6 +2113,7 @@ pub struct DbUpdate {
|
||||
user_browse_history: __sdk::TableUpdate<UserBrowseHistory>,
|
||||
visual_novel_agent_message: __sdk::TableUpdate<VisualNovelAgentMessageRow>,
|
||||
visual_novel_agent_session: __sdk::TableUpdate<VisualNovelAgentSessionRow>,
|
||||
visual_novel_gallery_view: __sdk::TableUpdate<VisualNovelGalleryViewRow>,
|
||||
visual_novel_runtime_event: __sdk::TableUpdate<VisualNovelRuntimeEvent>,
|
||||
visual_novel_runtime_history_entry: __sdk::TableUpdate<VisualNovelRuntimeHistoryEntryRow>,
|
||||
visual_novel_runtime_run: __sdk::TableUpdate<VisualNovelRuntimeRunRow>,
|
||||
@@ -2166,6 +2204,9 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
|
||||
"big_fish_event" => db_update
|
||||
.big_fish_event
|
||||
.append(big_fish_event_table::parse_table_update(table_update)?),
|
||||
"big_fish_gallery_view" => db_update.big_fish_gallery_view.append(
|
||||
big_fish_gallery_view_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"big_fish_runtime_run" => db_update.big_fish_runtime_run.append(
|
||||
big_fish_runtime_run_table::parse_table_update(table_update)?,
|
||||
),
|
||||
@@ -2216,6 +2257,9 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
|
||||
"match_3_d_agent_session" => db_update.match_3_d_agent_session.append(
|
||||
match_3_d_agent_session_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"match_3_d_gallery_view" => db_update.match_3_d_gallery_view.append(
|
||||
match_3_d_gallery_view_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"match_3_d_runtime_run" => db_update.match_3_d_runtime_run.append(
|
||||
match_3_d_runtime_run_table::parse_table_update(table_update)?,
|
||||
),
|
||||
@@ -2323,6 +2367,9 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
|
||||
"square_hole_agent_session" => db_update.square_hole_agent_session.append(
|
||||
square_hole_agent_session_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"square_hole_gallery_view" => db_update.square_hole_gallery_view.append(
|
||||
square_hole_gallery_view_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"square_hole_runtime_run" => db_update.square_hole_runtime_run.append(
|
||||
square_hole_runtime_run_table::parse_table_update(table_update)?,
|
||||
),
|
||||
@@ -2356,6 +2403,9 @@ impl TryFrom<__ws::v2::TransactionUpdate> for DbUpdate {
|
||||
"visual_novel_agent_session" => db_update.visual_novel_agent_session.append(
|
||||
visual_novel_agent_session_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"visual_novel_gallery_view" => db_update.visual_novel_gallery_view.append(
|
||||
visual_novel_gallery_view_table::parse_table_update(table_update)?,
|
||||
),
|
||||
"visual_novel_runtime_event" => db_update.visual_novel_runtime_event.append(
|
||||
visual_novel_runtime_event_table::parse_table_update(table_update)?,
|
||||
),
|
||||
@@ -2848,10 +2898,26 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
&self.visual_novel_work_profile,
|
||||
)
|
||||
.with_updates_by_pk(|row| &row.profile_id);
|
||||
diff.puzzle_gallery_view = cache.apply_diff_to_table::<PuzzleGalleryViewRow>(
|
||||
diff.big_fish_gallery_view = cache.apply_diff_to_table::<BigFishWorkSummarySnapshot>(
|
||||
"big_fish_gallery_view",
|
||||
&self.big_fish_gallery_view,
|
||||
);
|
||||
diff.match_3_d_gallery_view = cache.apply_diff_to_table::<Match3DGalleryViewRow>(
|
||||
"match_3_d_gallery_view",
|
||||
&self.match_3_d_gallery_view,
|
||||
);
|
||||
diff.puzzle_gallery_view = cache.apply_diff_to_table::<PuzzleWorkProfile>(
|
||||
"puzzle_gallery_view",
|
||||
&self.puzzle_gallery_view,
|
||||
);
|
||||
diff.square_hole_gallery_view = cache.apply_diff_to_table::<SquareHoleGalleryViewRow>(
|
||||
"square_hole_gallery_view",
|
||||
&self.square_hole_gallery_view,
|
||||
);
|
||||
diff.visual_novel_gallery_view = cache.apply_diff_to_table::<VisualNovelGalleryViewRow>(
|
||||
"visual_novel_gallery_view",
|
||||
&self.visual_novel_gallery_view,
|
||||
);
|
||||
|
||||
diff
|
||||
}
|
||||
@@ -2931,6 +2997,9 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
"big_fish_event" => db_update
|
||||
.big_fish_event
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"big_fish_gallery_view" => db_update
|
||||
.big_fish_gallery_view
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"big_fish_runtime_run" => db_update
|
||||
.big_fish_runtime_run
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
@@ -2979,6 +3048,9 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
"match_3_d_agent_session" => db_update
|
||||
.match_3_d_agent_session
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"match_3_d_gallery_view" => db_update
|
||||
.match_3_d_gallery_view
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"match_3_d_runtime_run" => db_update
|
||||
.match_3_d_runtime_run
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
@@ -3084,6 +3156,9 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
"square_hole_agent_session" => db_update
|
||||
.square_hole_agent_session
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"square_hole_gallery_view" => db_update
|
||||
.square_hole_gallery_view
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"square_hole_runtime_run" => db_update
|
||||
.square_hole_runtime_run
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
@@ -3117,6 +3192,9 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
"visual_novel_agent_session" => db_update
|
||||
.visual_novel_agent_session
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"visual_novel_gallery_view" => db_update
|
||||
.visual_novel_gallery_view
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
"visual_novel_runtime_event" => db_update
|
||||
.visual_novel_runtime_event
|
||||
.append(__sdk::parse_row_list_as_inserts(table_rows.rows)?),
|
||||
@@ -3214,6 +3292,9 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
"big_fish_event" => db_update
|
||||
.big_fish_event
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"big_fish_gallery_view" => db_update
|
||||
.big_fish_gallery_view
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"big_fish_runtime_run" => db_update
|
||||
.big_fish_runtime_run
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
@@ -3262,6 +3343,9 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
"match_3_d_agent_session" => db_update
|
||||
.match_3_d_agent_session
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"match_3_d_gallery_view" => db_update
|
||||
.match_3_d_gallery_view
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"match_3_d_runtime_run" => db_update
|
||||
.match_3_d_runtime_run
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
@@ -3367,6 +3451,9 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
"square_hole_agent_session" => db_update
|
||||
.square_hole_agent_session
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"square_hole_gallery_view" => db_update
|
||||
.square_hole_gallery_view
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"square_hole_runtime_run" => db_update
|
||||
.square_hole_runtime_run
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
@@ -3400,6 +3487,9 @@ impl __sdk::DbUpdate for DbUpdate {
|
||||
"visual_novel_agent_session" => db_update
|
||||
.visual_novel_agent_session
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"visual_novel_gallery_view" => db_update
|
||||
.visual_novel_gallery_view
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
"visual_novel_runtime_event" => db_update
|
||||
.visual_novel_runtime_event
|
||||
.append(__sdk::parse_row_list_as_deletes(table_rows.rows)?),
|
||||
@@ -3453,6 +3543,7 @@ pub struct AppliedDiff<'r> {
|
||||
big_fish_asset_slot: __sdk::TableAppliedDiff<'r, BigFishAssetSlot>,
|
||||
big_fish_creation_session: __sdk::TableAppliedDiff<'r, BigFishCreationSession>,
|
||||
big_fish_event: __sdk::TableAppliedDiff<'r, BigFishEvent>,
|
||||
big_fish_gallery_view: __sdk::TableAppliedDiff<'r, BigFishWorkSummarySnapshot>,
|
||||
big_fish_runtime_run: __sdk::TableAppliedDiff<'r, BigFishRuntimeRun>,
|
||||
chapter_progression: __sdk::TableAppliedDiff<'r, ChapterProgression>,
|
||||
creation_entry_config: __sdk::TableAppliedDiff<'r, CreationEntryConfig>,
|
||||
@@ -3469,6 +3560,7 @@ pub struct AppliedDiff<'r> {
|
||||
inventory_slot: __sdk::TableAppliedDiff<'r, InventorySlot>,
|
||||
match_3_d_agent_message: __sdk::TableAppliedDiff<'r, Match3DAgentMessageRow>,
|
||||
match_3_d_agent_session: __sdk::TableAppliedDiff<'r, Match3DAgentSessionRow>,
|
||||
match_3_d_gallery_view: __sdk::TableAppliedDiff<'r, Match3DGalleryViewRow>,
|
||||
match_3_d_runtime_run: __sdk::TableAppliedDiff<'r, Match3DRuntimeRunRow>,
|
||||
match_3_d_work_profile: __sdk::TableAppliedDiff<'r, Match3DWorkProfileRow>,
|
||||
npc_state: __sdk::TableAppliedDiff<'r, NpcState>,
|
||||
@@ -3493,7 +3585,7 @@ pub struct AppliedDiff<'r> {
|
||||
puzzle_agent_message: __sdk::TableAppliedDiff<'r, PuzzleAgentMessageRow>,
|
||||
puzzle_agent_session: __sdk::TableAppliedDiff<'r, PuzzleAgentSessionRow>,
|
||||
puzzle_event: __sdk::TableAppliedDiff<'r, PuzzleEvent>,
|
||||
puzzle_gallery_view: __sdk::TableAppliedDiff<'r, PuzzleGalleryViewRow>,
|
||||
puzzle_gallery_view: __sdk::TableAppliedDiff<'r, PuzzleWorkProfile>,
|
||||
puzzle_leaderboard_entry: __sdk::TableAppliedDiff<'r, PuzzleLeaderboardEntryRow>,
|
||||
puzzle_runtime_run: __sdk::TableAppliedDiff<'r, PuzzleRuntimeRunRow>,
|
||||
puzzle_work_profile: __sdk::TableAppliedDiff<'r, PuzzleWorkProfileRow>,
|
||||
@@ -3504,6 +3596,7 @@ pub struct AppliedDiff<'r> {
|
||||
runtime_snapshot: __sdk::TableAppliedDiff<'r, RuntimeSnapshotRow>,
|
||||
square_hole_agent_message: __sdk::TableAppliedDiff<'r, SquareHoleAgentMessageRow>,
|
||||
square_hole_agent_session: __sdk::TableAppliedDiff<'r, SquareHoleAgentSessionRow>,
|
||||
square_hole_gallery_view: __sdk::TableAppliedDiff<'r, SquareHoleGalleryViewRow>,
|
||||
square_hole_runtime_run: __sdk::TableAppliedDiff<'r, SquareHoleRuntimeRunRow>,
|
||||
square_hole_work_profile: __sdk::TableAppliedDiff<'r, SquareHoleWorkProfileRow>,
|
||||
story_event: __sdk::TableAppliedDiff<'r, StoryEvent>,
|
||||
@@ -3515,6 +3608,7 @@ pub struct AppliedDiff<'r> {
|
||||
user_browse_history: __sdk::TableAppliedDiff<'r, UserBrowseHistory>,
|
||||
visual_novel_agent_message: __sdk::TableAppliedDiff<'r, VisualNovelAgentMessageRow>,
|
||||
visual_novel_agent_session: __sdk::TableAppliedDiff<'r, VisualNovelAgentSessionRow>,
|
||||
visual_novel_gallery_view: __sdk::TableAppliedDiff<'r, VisualNovelGalleryViewRow>,
|
||||
visual_novel_runtime_event: __sdk::TableAppliedDiff<'r, VisualNovelRuntimeEvent>,
|
||||
visual_novel_runtime_history_entry:
|
||||
__sdk::TableAppliedDiff<'r, VisualNovelRuntimeHistoryEntryRow>,
|
||||
@@ -3645,6 +3739,11 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
|
||||
&self.big_fish_event,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<BigFishWorkSummarySnapshot>(
|
||||
"big_fish_gallery_view",
|
||||
&self.big_fish_gallery_view,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<BigFishRuntimeRun>(
|
||||
"big_fish_runtime_run",
|
||||
&self.big_fish_runtime_run,
|
||||
@@ -3725,6 +3824,11 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
|
||||
&self.match_3_d_agent_session,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<Match3DGalleryViewRow>(
|
||||
"match_3_d_gallery_view",
|
||||
&self.match_3_d_gallery_view,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<Match3DRuntimeRunRow>(
|
||||
"match_3_d_runtime_run",
|
||||
&self.match_3_d_runtime_run,
|
||||
@@ -3841,7 +3945,7 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
|
||||
&self.puzzle_event,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<PuzzleGalleryViewRow>(
|
||||
callbacks.invoke_table_row_callbacks::<PuzzleWorkProfile>(
|
||||
"puzzle_gallery_view",
|
||||
&self.puzzle_gallery_view,
|
||||
event,
|
||||
@@ -3892,6 +3996,11 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
|
||||
&self.square_hole_agent_session,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<SquareHoleGalleryViewRow>(
|
||||
"square_hole_gallery_view",
|
||||
&self.square_hole_gallery_view,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<SquareHoleRuntimeRunRow>(
|
||||
"square_hole_runtime_run",
|
||||
&self.square_hole_runtime_run,
|
||||
@@ -3943,6 +4052,11 @@ impl<'r> __sdk::AppliedDiff<'r> for AppliedDiff<'r> {
|
||||
&self.visual_novel_agent_session,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<VisualNovelGalleryViewRow>(
|
||||
"visual_novel_gallery_view",
|
||||
&self.visual_novel_gallery_view,
|
||||
event,
|
||||
);
|
||||
callbacks.invoke_table_row_callbacks::<VisualNovelRuntimeEvent>(
|
||||
"visual_novel_runtime_event",
|
||||
&self.visual_novel_runtime_event,
|
||||
@@ -4647,6 +4761,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
|
||||
big_fish_asset_slot_table::register_table(client_cache);
|
||||
big_fish_creation_session_table::register_table(client_cache);
|
||||
big_fish_event_table::register_table(client_cache);
|
||||
big_fish_gallery_view_table::register_table(client_cache);
|
||||
big_fish_runtime_run_table::register_table(client_cache);
|
||||
chapter_progression_table::register_table(client_cache);
|
||||
creation_entry_config_table::register_table(client_cache);
|
||||
@@ -4663,6 +4778,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
|
||||
inventory_slot_table::register_table(client_cache);
|
||||
match_3_d_agent_message_table::register_table(client_cache);
|
||||
match_3_d_agent_session_table::register_table(client_cache);
|
||||
match_3_d_gallery_view_table::register_table(client_cache);
|
||||
match_3_d_runtime_run_table::register_table(client_cache);
|
||||
match_3_d_work_profile_table::register_table(client_cache);
|
||||
npc_state_table::register_table(client_cache);
|
||||
@@ -4698,6 +4814,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
|
||||
runtime_snapshot_table::register_table(client_cache);
|
||||
square_hole_agent_message_table::register_table(client_cache);
|
||||
square_hole_agent_session_table::register_table(client_cache);
|
||||
square_hole_gallery_view_table::register_table(client_cache);
|
||||
square_hole_runtime_run_table::register_table(client_cache);
|
||||
square_hole_work_profile_table::register_table(client_cache);
|
||||
story_event_table::register_table(client_cache);
|
||||
@@ -4709,6 +4826,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
|
||||
user_browse_history_table::register_table(client_cache);
|
||||
visual_novel_agent_message_table::register_table(client_cache);
|
||||
visual_novel_agent_session_table::register_table(client_cache);
|
||||
visual_novel_gallery_view_table::register_table(client_cache);
|
||||
visual_novel_runtime_event_table::register_table(client_cache);
|
||||
visual_novel_runtime_history_entry_table::register_table(client_cache);
|
||||
visual_novel_runtime_run_table::register_table(client_cache);
|
||||
@@ -4739,6 +4857,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
|
||||
"big_fish_asset_slot",
|
||||
"big_fish_creation_session",
|
||||
"big_fish_event",
|
||||
"big_fish_gallery_view",
|
||||
"big_fish_runtime_run",
|
||||
"chapter_progression",
|
||||
"creation_entry_config",
|
||||
@@ -4755,6 +4874,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
|
||||
"inventory_slot",
|
||||
"match_3_d_agent_message",
|
||||
"match_3_d_agent_session",
|
||||
"match_3_d_gallery_view",
|
||||
"match_3_d_runtime_run",
|
||||
"match_3_d_work_profile",
|
||||
"npc_state",
|
||||
@@ -4790,6 +4910,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
|
||||
"runtime_snapshot",
|
||||
"square_hole_agent_message",
|
||||
"square_hole_agent_session",
|
||||
"square_hole_gallery_view",
|
||||
"square_hole_runtime_run",
|
||||
"square_hole_work_profile",
|
||||
"story_event",
|
||||
@@ -4801,6 +4922,7 @@ impl __sdk::SpacetimeModule for RemoteModule {
|
||||
"user_browse_history",
|
||||
"visual_novel_agent_message",
|
||||
"visual_novel_agent_session",
|
||||
"visual_novel_gallery_view",
|
||||
"visual_novel_runtime_event",
|
||||
"visual_novel_runtime_history_entry",
|
||||
"visual_novel_runtime_run",
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::puzzle_anchor_status_type::PuzzleAnchorStatus;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleAnchorItem {
|
||||
pub key: String,
|
||||
pub label: String,
|
||||
pub value: String,
|
||||
pub status: PuzzleAnchorStatus,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for PuzzleAnchorItem {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::puzzle_anchor_item_type::PuzzleAnchorItem;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleAnchorPack {
|
||||
pub theme_promise: PuzzleAnchorItem,
|
||||
pub visual_subject: PuzzleAnchorItem,
|
||||
pub visual_mood: PuzzleAnchorItem,
|
||||
pub composition_hooks: PuzzleAnchorItem,
|
||||
pub tags_and_forbidden: PuzzleAnchorItem,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for PuzzleAnchorPack {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
#[derive(Copy, Eq, Hash)]
|
||||
pub enum PuzzleAnchorStatus {
|
||||
Missing,
|
||||
|
||||
Inferred,
|
||||
|
||||
Confirmed,
|
||||
|
||||
Locked,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for PuzzleAnchorStatus {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleAudioAsset {
|
||||
pub task_id: String,
|
||||
pub provider: String,
|
||||
pub asset_object_id: Option<String>,
|
||||
pub asset_kind: Option<String>,
|
||||
pub audio_src: String,
|
||||
pub prompt: Option<String>,
|
||||
pub title: Option<String>,
|
||||
pub updated_at: Option<String>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for PuzzleAudioAsset {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::puzzle_audio_asset_type::PuzzleAudioAsset;
|
||||
use super::puzzle_generated_image_candidate_type::PuzzleGeneratedImageCandidate;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleDraftLevel {
|
||||
pub level_id: String,
|
||||
pub level_name: String,
|
||||
pub picture_description: String,
|
||||
pub picture_reference: Option<String>,
|
||||
pub ui_background_prompt: Option<String>,
|
||||
pub ui_background_image_src: Option<String>,
|
||||
pub ui_background_image_object_key: Option<String>,
|
||||
pub background_music: Option<PuzzleAudioAsset>,
|
||||
pub candidates: Vec<PuzzleGeneratedImageCandidate>,
|
||||
pub selected_candidate_id: Option<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub cover_asset_id: Option<String>,
|
||||
pub generation_status: String,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for PuzzleDraftLevel {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -2,246 +2,12 @@
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::puzzle_anchor_pack_type::PuzzleAnchorPack;
|
||||
use super::puzzle_draft_level_type::PuzzleDraftLevel;
|
||||
use super::puzzle_publication_status_type::PuzzlePublicationStatus;
|
||||
use super::puzzle_work_profile_type::PuzzleWorkProfile;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, Copy, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
#[derive(Eq, Hash)]
|
||||
pub enum PuzzleGalleryAnchorStatus {
|
||||
Missing,
|
||||
Inferred,
|
||||
Confirmed,
|
||||
Locked,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryAnchorItem {
|
||||
pub key: String,
|
||||
pub label: String,
|
||||
pub value: String,
|
||||
pub status: PuzzleGalleryAnchorStatus,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryAnchorPack {
|
||||
pub theme_promise: PuzzleGalleryAnchorItem,
|
||||
pub visual_subject: PuzzleGalleryAnchorItem,
|
||||
pub visual_mood: PuzzleGalleryAnchorItem,
|
||||
pub composition_hooks: PuzzleGalleryAnchorItem,
|
||||
pub tags_and_forbidden: PuzzleGalleryAnchorItem,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryGeneratedImageCandidate {
|
||||
pub candidate_id: String,
|
||||
pub image_src: String,
|
||||
pub asset_id: String,
|
||||
pub prompt: String,
|
||||
pub actual_prompt: Option<String>,
|
||||
pub source_type: String,
|
||||
pub selected: bool,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryAudioAsset {
|
||||
pub task_id: String,
|
||||
pub provider: String,
|
||||
pub asset_object_id: Option<String>,
|
||||
pub asset_kind: Option<String>,
|
||||
pub audio_src: String,
|
||||
pub prompt: Option<String>,
|
||||
pub title: Option<String>,
|
||||
pub updated_at: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryDraftLevel {
|
||||
pub level_id: String,
|
||||
pub level_name: String,
|
||||
pub picture_description: String,
|
||||
pub picture_reference: Option<String>,
|
||||
pub ui_background_prompt: Option<String>,
|
||||
pub ui_background_image_src: Option<String>,
|
||||
pub ui_background_image_object_key: Option<String>,
|
||||
pub background_music: Option<PuzzleGalleryAudioAsset>,
|
||||
pub candidates: Vec<PuzzleGalleryGeneratedImageCandidate>,
|
||||
pub selected_candidate_id: Option<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub cover_asset_id: Option<String>,
|
||||
pub generation_status: String,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, Copy, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
#[derive(Eq, Hash)]
|
||||
pub enum PuzzleGalleryPublicationStatus {
|
||||
Draft,
|
||||
Published,
|
||||
}
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGalleryViewRow {
|
||||
pub work_id: String,
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_session_id: Option<String>,
|
||||
pub author_display_name: String,
|
||||
pub work_title: String,
|
||||
pub work_description: String,
|
||||
pub level_name: String,
|
||||
pub summary: String,
|
||||
pub theme_tags: Vec<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub cover_asset_id: Option<String>,
|
||||
pub levels: Vec<PuzzleGalleryDraftLevel>,
|
||||
pub publication_status: PuzzleGalleryPublicationStatus,
|
||||
pub updated_at_micros: i64,
|
||||
pub published_at_micros: Option<i64>,
|
||||
pub play_count: u32,
|
||||
pub remix_count: u32,
|
||||
pub like_count: u32,
|
||||
pub recent_play_count_7d: u32,
|
||||
pub point_incentive_total_half_points: u64,
|
||||
pub point_incentive_claimed_points: u64,
|
||||
pub publish_ready: bool,
|
||||
pub anchor_pack: PuzzleGalleryAnchorPack,
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryAnchorStatus> for module_puzzle::PuzzleAnchorStatus {
|
||||
fn from(status: PuzzleGalleryAnchorStatus) -> Self {
|
||||
match status {
|
||||
PuzzleGalleryAnchorStatus::Missing => Self::Missing,
|
||||
PuzzleGalleryAnchorStatus::Inferred => Self::Inferred,
|
||||
PuzzleGalleryAnchorStatus::Confirmed => Self::Confirmed,
|
||||
PuzzleGalleryAnchorStatus::Locked => Self::Locked,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryAnchorItem> for module_puzzle::PuzzleAnchorItem {
|
||||
fn from(item: PuzzleGalleryAnchorItem) -> Self {
|
||||
Self {
|
||||
key: item.key,
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
status: item.status.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryAnchorPack> for module_puzzle::PuzzleAnchorPack {
|
||||
fn from(pack: PuzzleGalleryAnchorPack) -> Self {
|
||||
Self {
|
||||
theme_promise: pack.theme_promise.into(),
|
||||
visual_subject: pack.visual_subject.into(),
|
||||
visual_mood: pack.visual_mood.into(),
|
||||
composition_hooks: pack.composition_hooks.into(),
|
||||
tags_and_forbidden: pack.tags_and_forbidden.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryGeneratedImageCandidate>
|
||||
for module_puzzle::PuzzleGeneratedImageCandidate
|
||||
{
|
||||
fn from(candidate: PuzzleGalleryGeneratedImageCandidate) -> Self {
|
||||
Self {
|
||||
candidate_id: candidate.candidate_id,
|
||||
image_src: candidate.image_src,
|
||||
asset_id: candidate.asset_id,
|
||||
prompt: candidate.prompt,
|
||||
actual_prompt: candidate.actual_prompt,
|
||||
source_type: candidate.source_type,
|
||||
selected: candidate.selected,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryAudioAsset> for module_puzzle::PuzzleAudioAsset {
|
||||
fn from(asset: PuzzleGalleryAudioAsset) -> Self {
|
||||
Self {
|
||||
task_id: asset.task_id,
|
||||
provider: asset.provider,
|
||||
asset_object_id: asset.asset_object_id,
|
||||
asset_kind: asset.asset_kind,
|
||||
audio_src: asset.audio_src,
|
||||
prompt: asset.prompt,
|
||||
title: asset.title,
|
||||
updated_at: asset.updated_at,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryDraftLevel> for module_puzzle::PuzzleDraftLevel {
|
||||
fn from(level: PuzzleGalleryDraftLevel) -> Self {
|
||||
Self {
|
||||
level_id: level.level_id,
|
||||
level_name: level.level_name,
|
||||
picture_description: level.picture_description,
|
||||
picture_reference: level.picture_reference,
|
||||
ui_background_prompt: level.ui_background_prompt,
|
||||
ui_background_image_src: level.ui_background_image_src,
|
||||
ui_background_image_object_key: level.ui_background_image_object_key,
|
||||
background_music: level.background_music.map(Into::into),
|
||||
candidates: level.candidates.into_iter().map(Into::into).collect(),
|
||||
selected_candidate_id: level.selected_candidate_id,
|
||||
cover_image_src: level.cover_image_src,
|
||||
cover_asset_id: level.cover_asset_id,
|
||||
generation_status: level.generation_status,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryPublicationStatus> for module_puzzle::PuzzlePublicationStatus {
|
||||
fn from(status: PuzzleGalleryPublicationStatus) -> Self {
|
||||
match status {
|
||||
PuzzleGalleryPublicationStatus::Draft => Self::Draft,
|
||||
PuzzleGalleryPublicationStatus::Published => Self::Published,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<PuzzleGalleryViewRow> for module_puzzle::PuzzleWorkProfile {
|
||||
fn from(row: PuzzleGalleryViewRow) -> Self {
|
||||
Self {
|
||||
work_id: row.work_id,
|
||||
profile_id: row.profile_id,
|
||||
owner_user_id: row.owner_user_id,
|
||||
source_session_id: row.source_session_id,
|
||||
author_display_name: row.author_display_name,
|
||||
work_title: row.work_title,
|
||||
work_description: row.work_description,
|
||||
level_name: row.level_name,
|
||||
summary: row.summary,
|
||||
theme_tags: row.theme_tags,
|
||||
cover_image_src: row.cover_image_src,
|
||||
cover_asset_id: row.cover_asset_id,
|
||||
levels: row.levels.into_iter().map(Into::into).collect(),
|
||||
publication_status: row.publication_status.into(),
|
||||
updated_at_micros: row.updated_at_micros,
|
||||
published_at_micros: row.published_at_micros,
|
||||
play_count: row.play_count,
|
||||
remix_count: row.remix_count,
|
||||
like_count: row.like_count,
|
||||
recent_play_count_7d: row.recent_play_count_7d,
|
||||
point_incentive_total_half_points: row.point_incentive_total_half_points,
|
||||
point_incentive_claimed_points: row.point_incentive_claimed_points,
|
||||
publish_ready: row.publish_ready,
|
||||
anchor_pack: row.anchor_pack.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl __sdk::InModule for PuzzleGalleryViewRow {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Table handle for the table `puzzle_gallery_view`.
|
||||
///
|
||||
/// Obtain a handle from the [`PuzzleGalleryViewTableAccess::puzzle_gallery_view`] method on [`super::RemoteTables`],
|
||||
@@ -251,7 +17,7 @@ impl __sdk::InModule for PuzzleGalleryViewRow {
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.puzzle_gallery_view().on_insert(...)`.
|
||||
pub struct PuzzleGalleryViewTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<PuzzleGalleryViewRow>,
|
||||
imp: __sdk::TableHandle<PuzzleWorkProfile>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
@@ -270,7 +36,7 @@ impl PuzzleGalleryViewTableAccess for super::RemoteTables {
|
||||
PuzzleGalleryViewTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<PuzzleGalleryViewRow>("puzzle_gallery_view"),
|
||||
.get_table::<PuzzleWorkProfile>("puzzle_gallery_view"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
@@ -280,13 +46,13 @@ pub struct PuzzleGalleryViewInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct PuzzleGalleryViewDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for PuzzleGalleryViewTableHandle<'ctx> {
|
||||
type Row = PuzzleGalleryViewRow;
|
||||
type Row = PuzzleWorkProfile;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = PuzzleGalleryViewRow> + '_ {
|
||||
fn iter(&self) -> impl Iterator<Item = PuzzleWorkProfile> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
@@ -319,32 +85,32 @@ impl<'ctx> __sdk::Table for PuzzleGalleryViewTableHandle<'ctx> {
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table = client_cache.get_or_make_table::<PuzzleGalleryViewRow>("puzzle_gallery_view");
|
||||
let _table = client_cache.get_or_make_table::<PuzzleWorkProfile>("puzzle_gallery_view");
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<PuzzleGalleryViewRow>> {
|
||||
) -> __sdk::Result<__sdk::TableUpdate<PuzzleWorkProfile>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<PuzzleGalleryViewRow>", "TableUpdate")
|
||||
__sdk::InternalError::failed_parse("TableUpdate<PuzzleWorkProfile>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `PuzzleGalleryViewRow`.
|
||||
/// Extension trait for query builder access to the table `PuzzleWorkProfile`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait puzzle_gallery_viewQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `PuzzleGalleryViewRow`.
|
||||
fn puzzle_gallery_view(&self) -> __sdk::__query_builder::Table<PuzzleGalleryViewRow>;
|
||||
/// Get a query builder for the table `PuzzleWorkProfile`.
|
||||
fn puzzle_gallery_view(&self) -> __sdk::__query_builder::Table<PuzzleWorkProfile>;
|
||||
}
|
||||
|
||||
impl puzzle_gallery_viewQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn puzzle_gallery_view(&self) -> __sdk::__query_builder::Table<PuzzleGalleryViewRow> {
|
||||
fn puzzle_gallery_view(&self) -> __sdk::__query_builder::Table<PuzzleWorkProfile> {
|
||||
__sdk::__query_builder::Table::new("puzzle_gallery_view")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleGeneratedImageCandidate {
|
||||
pub candidate_id: String,
|
||||
pub image_src: String,
|
||||
pub asset_id: String,
|
||||
pub prompt: String,
|
||||
pub actual_prompt: Option<String>,
|
||||
pub source_type: String,
|
||||
pub selected: bool,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for PuzzleGeneratedImageCandidate {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::puzzle_anchor_pack_type::PuzzleAnchorPack;
|
||||
use super::puzzle_draft_level_type::PuzzleDraftLevel;
|
||||
use super::puzzle_publication_status_type::PuzzlePublicationStatus;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct PuzzleWorkProfile {
|
||||
pub work_id: String,
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_session_id: Option<String>,
|
||||
pub author_display_name: String,
|
||||
pub work_title: String,
|
||||
pub work_description: String,
|
||||
pub level_name: String,
|
||||
pub summary: String,
|
||||
pub theme_tags: Vec<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub cover_asset_id: Option<String>,
|
||||
pub levels: Vec<PuzzleDraftLevel>,
|
||||
pub publication_status: PuzzlePublicationStatus,
|
||||
pub updated_at_micros: i64,
|
||||
pub published_at_micros: Option<i64>,
|
||||
pub play_count: u32,
|
||||
pub remix_count: u32,
|
||||
pub like_count: u32,
|
||||
pub recent_play_count_7_d: u32,
|
||||
pub point_incentive_total_half_points: u64,
|
||||
pub point_incentive_claimed_points: u64,
|
||||
pub publish_ready: bool,
|
||||
pub anchor_pack: PuzzleAnchorPack,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for PuzzleWorkProfile {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `PuzzleWorkProfile`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct PuzzleWorkProfileCols {
|
||||
pub work_id: __sdk::__query_builder::Col<PuzzleWorkProfile, String>,
|
||||
pub profile_id: __sdk::__query_builder::Col<PuzzleWorkProfile, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::Col<PuzzleWorkProfile, String>,
|
||||
pub source_session_id: __sdk::__query_builder::Col<PuzzleWorkProfile, Option<String>>,
|
||||
pub author_display_name: __sdk::__query_builder::Col<PuzzleWorkProfile, String>,
|
||||
pub work_title: __sdk::__query_builder::Col<PuzzleWorkProfile, String>,
|
||||
pub work_description: __sdk::__query_builder::Col<PuzzleWorkProfile, String>,
|
||||
pub level_name: __sdk::__query_builder::Col<PuzzleWorkProfile, String>,
|
||||
pub summary: __sdk::__query_builder::Col<PuzzleWorkProfile, String>,
|
||||
pub theme_tags: __sdk::__query_builder::Col<PuzzleWorkProfile, Vec<String>>,
|
||||
pub cover_image_src: __sdk::__query_builder::Col<PuzzleWorkProfile, Option<String>>,
|
||||
pub cover_asset_id: __sdk::__query_builder::Col<PuzzleWorkProfile, Option<String>>,
|
||||
pub levels: __sdk::__query_builder::Col<PuzzleWorkProfile, Vec<PuzzleDraftLevel>>,
|
||||
pub publication_status: __sdk::__query_builder::Col<PuzzleWorkProfile, PuzzlePublicationStatus>,
|
||||
pub updated_at_micros: __sdk::__query_builder::Col<PuzzleWorkProfile, i64>,
|
||||
pub published_at_micros: __sdk::__query_builder::Col<PuzzleWorkProfile, Option<i64>>,
|
||||
pub play_count: __sdk::__query_builder::Col<PuzzleWorkProfile, u32>,
|
||||
pub remix_count: __sdk::__query_builder::Col<PuzzleWorkProfile, u32>,
|
||||
pub like_count: __sdk::__query_builder::Col<PuzzleWorkProfile, u32>,
|
||||
pub recent_play_count_7_d: __sdk::__query_builder::Col<PuzzleWorkProfile, u32>,
|
||||
pub point_incentive_total_half_points: __sdk::__query_builder::Col<PuzzleWorkProfile, u64>,
|
||||
pub point_incentive_claimed_points: __sdk::__query_builder::Col<PuzzleWorkProfile, u64>,
|
||||
pub publish_ready: __sdk::__query_builder::Col<PuzzleWorkProfile, bool>,
|
||||
pub anchor_pack: __sdk::__query_builder::Col<PuzzleWorkProfile, PuzzleAnchorPack>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for PuzzleWorkProfile {
|
||||
type Cols = PuzzleWorkProfileCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
PuzzleWorkProfileCols {
|
||||
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
|
||||
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
|
||||
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
|
||||
source_session_id: __sdk::__query_builder::Col::new(table_name, "source_session_id"),
|
||||
author_display_name: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"author_display_name",
|
||||
),
|
||||
work_title: __sdk::__query_builder::Col::new(table_name, "work_title"),
|
||||
work_description: __sdk::__query_builder::Col::new(table_name, "work_description"),
|
||||
level_name: __sdk::__query_builder::Col::new(table_name, "level_name"),
|
||||
summary: __sdk::__query_builder::Col::new(table_name, "summary"),
|
||||
theme_tags: __sdk::__query_builder::Col::new(table_name, "theme_tags"),
|
||||
cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"),
|
||||
cover_asset_id: __sdk::__query_builder::Col::new(table_name, "cover_asset_id"),
|
||||
levels: __sdk::__query_builder::Col::new(table_name, "levels"),
|
||||
publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"),
|
||||
updated_at_micros: __sdk::__query_builder::Col::new(table_name, "updated_at_micros"),
|
||||
published_at_micros: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"published_at_micros",
|
||||
),
|
||||
play_count: __sdk::__query_builder::Col::new(table_name, "play_count"),
|
||||
remix_count: __sdk::__query_builder::Col::new(table_name, "remix_count"),
|
||||
like_count: __sdk::__query_builder::Col::new(table_name, "like_count"),
|
||||
recent_play_count_7_d: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"recent_play_count_7_d",
|
||||
),
|
||||
point_incentive_total_half_points: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"point_incentive_total_half_points",
|
||||
),
|
||||
point_incentive_claimed_points: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"point_incentive_claimed_points",
|
||||
),
|
||||
publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"),
|
||||
anchor_pack: __sdk::__query_builder::Col::new(table_name, "anchor_pack"),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
use super::square_hole_hole_option_snapshot_type::SquareHoleHoleOptionSnapshot;
|
||||
use super::square_hole_shape_option_snapshot_type::SquareHoleShapeOptionSnapshot;
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct SquareHoleGalleryViewRow {
|
||||
pub work_id: String,
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_session_id: String,
|
||||
pub author_display_name: String,
|
||||
pub game_name: String,
|
||||
pub theme_text: String,
|
||||
pub twist_rule: String,
|
||||
pub summary_text: String,
|
||||
pub tags: Vec<String>,
|
||||
pub cover_image_src: String,
|
||||
pub background_prompt: String,
|
||||
pub background_image_src: String,
|
||||
pub shape_options: Vec<SquareHoleShapeOptionSnapshot>,
|
||||
pub hole_options: Vec<SquareHoleHoleOptionSnapshot>,
|
||||
pub shape_count: u32,
|
||||
pub difficulty: u32,
|
||||
pub publication_status: String,
|
||||
pub publish_ready: bool,
|
||||
pub play_count: u32,
|
||||
pub updated_at_micros: i64,
|
||||
pub published_at_micros: Option<i64>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for SquareHoleGalleryViewRow {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `SquareHoleGalleryViewRow`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct SquareHoleGalleryViewRowCols {
|
||||
pub work_id: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub profile_id: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub source_session_id: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub author_display_name: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub game_name: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub theme_text: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub twist_rule: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub summary_text: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub tags: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, Vec<String>>,
|
||||
pub cover_image_src: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub background_prompt: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub background_image_src: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub shape_options:
|
||||
__sdk::__query_builder::Col<SquareHoleGalleryViewRow, Vec<SquareHoleShapeOptionSnapshot>>,
|
||||
pub hole_options:
|
||||
__sdk::__query_builder::Col<SquareHoleGalleryViewRow, Vec<SquareHoleHoleOptionSnapshot>>,
|
||||
pub shape_count: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, u32>,
|
||||
pub difficulty: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, u32>,
|
||||
pub publication_status: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, String>,
|
||||
pub publish_ready: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, bool>,
|
||||
pub play_count: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, u32>,
|
||||
pub updated_at_micros: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, i64>,
|
||||
pub published_at_micros: __sdk::__query_builder::Col<SquareHoleGalleryViewRow, Option<i64>>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for SquareHoleGalleryViewRow {
|
||||
type Cols = SquareHoleGalleryViewRowCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
SquareHoleGalleryViewRowCols {
|
||||
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
|
||||
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
|
||||
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
|
||||
source_session_id: __sdk::__query_builder::Col::new(table_name, "source_session_id"),
|
||||
author_display_name: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"author_display_name",
|
||||
),
|
||||
game_name: __sdk::__query_builder::Col::new(table_name, "game_name"),
|
||||
theme_text: __sdk::__query_builder::Col::new(table_name, "theme_text"),
|
||||
twist_rule: __sdk::__query_builder::Col::new(table_name, "twist_rule"),
|
||||
summary_text: __sdk::__query_builder::Col::new(table_name, "summary_text"),
|
||||
tags: __sdk::__query_builder::Col::new(table_name, "tags"),
|
||||
cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"),
|
||||
background_prompt: __sdk::__query_builder::Col::new(table_name, "background_prompt"),
|
||||
background_image_src: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"background_image_src",
|
||||
),
|
||||
shape_options: __sdk::__query_builder::Col::new(table_name, "shape_options"),
|
||||
hole_options: __sdk::__query_builder::Col::new(table_name, "hole_options"),
|
||||
shape_count: __sdk::__query_builder::Col::new(table_name, "shape_count"),
|
||||
difficulty: __sdk::__query_builder::Col::new(table_name, "difficulty"),
|
||||
publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"),
|
||||
publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"),
|
||||
play_count: __sdk::__query_builder::Col::new(table_name, "play_count"),
|
||||
updated_at_micros: __sdk::__query_builder::Col::new(table_name, "updated_at_micros"),
|
||||
published_at_micros: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"published_at_micros",
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::square_hole_gallery_view_row_type::SquareHoleGalleryViewRow;
|
||||
use super::square_hole_hole_option_snapshot_type::SquareHoleHoleOptionSnapshot;
|
||||
use super::square_hole_shape_option_snapshot_type::SquareHoleShapeOptionSnapshot;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
/// Table handle for the table `square_hole_gallery_view`.
|
||||
///
|
||||
/// Obtain a handle from the [`SquareHoleGalleryViewTableAccess::square_hole_gallery_view`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.square_hole_gallery_view()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.square_hole_gallery_view().on_insert(...)`.
|
||||
pub struct SquareHoleGalleryViewTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<SquareHoleGalleryViewRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `square_hole_gallery_view`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait SquareHoleGalleryViewTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`SquareHoleGalleryViewTableHandle`], which mediates access to the table `square_hole_gallery_view`.
|
||||
fn square_hole_gallery_view(&self) -> SquareHoleGalleryViewTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl SquareHoleGalleryViewTableAccess for super::RemoteTables {
|
||||
fn square_hole_gallery_view(&self) -> SquareHoleGalleryViewTableHandle<'_> {
|
||||
SquareHoleGalleryViewTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<SquareHoleGalleryViewRow>("square_hole_gallery_view"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct SquareHoleGalleryViewInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct SquareHoleGalleryViewDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for SquareHoleGalleryViewTableHandle<'ctx> {
|
||||
type Row = SquareHoleGalleryViewRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = SquareHoleGalleryViewRow> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
type InsertCallbackId = SquareHoleGalleryViewInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> SquareHoleGalleryViewInsertCallbackId {
|
||||
SquareHoleGalleryViewInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: SquareHoleGalleryViewInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = SquareHoleGalleryViewDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> SquareHoleGalleryViewDeleteCallbackId {
|
||||
SquareHoleGalleryViewDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: SquareHoleGalleryViewDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table =
|
||||
client_cache.get_or_make_table::<SquareHoleGalleryViewRow>("square_hole_gallery_view");
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<SquareHoleGalleryViewRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<SquareHoleGalleryViewRow>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `SquareHoleGalleryViewRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait square_hole_gallery_viewQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `SquareHoleGalleryViewRow`.
|
||||
fn square_hole_gallery_view(&self) -> __sdk::__query_builder::Table<SquareHoleGalleryViewRow>;
|
||||
}
|
||||
|
||||
impl square_hole_gallery_viewQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn square_hole_gallery_view(&self) -> __sdk::__query_builder::Table<SquareHoleGalleryViewRow> {
|
||||
__sdk::__query_builder::Table::new("square_hole_gallery_view")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct SquareHoleHoleOptionSnapshot {
|
||||
pub hole_id: String,
|
||||
pub hole_kind: String,
|
||||
pub label: String,
|
||||
pub image_prompt: String,
|
||||
pub image_src: String,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for SquareHoleHoleOptionSnapshot {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct SquareHoleShapeOptionSnapshot {
|
||||
pub option_id: String,
|
||||
pub shape_kind: String,
|
||||
pub label: String,
|
||||
pub target_hole_id: String,
|
||||
pub image_prompt: String,
|
||||
pub image_src: String,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for SquareHoleShapeOptionSnapshot {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
|
||||
#[sats(crate = __lib)]
|
||||
pub struct VisualNovelGalleryViewRow {
|
||||
pub work_id: String,
|
||||
pub profile_id: String,
|
||||
pub owner_user_id: String,
|
||||
pub source_session_id: Option<String>,
|
||||
pub author_display_name: String,
|
||||
pub work_title: String,
|
||||
pub work_description: String,
|
||||
pub tags: Vec<String>,
|
||||
pub cover_image_src: Option<String>,
|
||||
pub source_asset_ids: Vec<String>,
|
||||
pub publication_status: String,
|
||||
pub publish_ready: bool,
|
||||
pub play_count: u32,
|
||||
pub created_at_micros: i64,
|
||||
pub updated_at_micros: i64,
|
||||
pub published_at_micros: Option<i64>,
|
||||
}
|
||||
|
||||
impl __sdk::InModule for VisualNovelGalleryViewRow {
|
||||
type Module = super::RemoteModule;
|
||||
}
|
||||
|
||||
/// Column accessor struct for the table `VisualNovelGalleryViewRow`.
|
||||
///
|
||||
/// Provides typed access to columns for query building.
|
||||
pub struct VisualNovelGalleryViewRowCols {
|
||||
pub work_id: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, String>,
|
||||
pub profile_id: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, String>,
|
||||
pub owner_user_id: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, String>,
|
||||
pub source_session_id: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, Option<String>>,
|
||||
pub author_display_name: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, String>,
|
||||
pub work_title: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, String>,
|
||||
pub work_description: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, String>,
|
||||
pub tags: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, Vec<String>>,
|
||||
pub cover_image_src: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, Option<String>>,
|
||||
pub source_asset_ids: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, Vec<String>>,
|
||||
pub publication_status: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, String>,
|
||||
pub publish_ready: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, bool>,
|
||||
pub play_count: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, u32>,
|
||||
pub created_at_micros: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, i64>,
|
||||
pub updated_at_micros: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, i64>,
|
||||
pub published_at_micros: __sdk::__query_builder::Col<VisualNovelGalleryViewRow, Option<i64>>,
|
||||
}
|
||||
|
||||
impl __sdk::__query_builder::HasCols for VisualNovelGalleryViewRow {
|
||||
type Cols = VisualNovelGalleryViewRowCols;
|
||||
fn cols(table_name: &'static str) -> Self::Cols {
|
||||
VisualNovelGalleryViewRowCols {
|
||||
work_id: __sdk::__query_builder::Col::new(table_name, "work_id"),
|
||||
profile_id: __sdk::__query_builder::Col::new(table_name, "profile_id"),
|
||||
owner_user_id: __sdk::__query_builder::Col::new(table_name, "owner_user_id"),
|
||||
source_session_id: __sdk::__query_builder::Col::new(table_name, "source_session_id"),
|
||||
author_display_name: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"author_display_name",
|
||||
),
|
||||
work_title: __sdk::__query_builder::Col::new(table_name, "work_title"),
|
||||
work_description: __sdk::__query_builder::Col::new(table_name, "work_description"),
|
||||
tags: __sdk::__query_builder::Col::new(table_name, "tags"),
|
||||
cover_image_src: __sdk::__query_builder::Col::new(table_name, "cover_image_src"),
|
||||
source_asset_ids: __sdk::__query_builder::Col::new(table_name, "source_asset_ids"),
|
||||
publication_status: __sdk::__query_builder::Col::new(table_name, "publication_status"),
|
||||
publish_ready: __sdk::__query_builder::Col::new(table_name, "publish_ready"),
|
||||
play_count: __sdk::__query_builder::Col::new(table_name, "play_count"),
|
||||
created_at_micros: __sdk::__query_builder::Col::new(table_name, "created_at_micros"),
|
||||
updated_at_micros: __sdk::__query_builder::Col::new(table_name, "updated_at_micros"),
|
||||
published_at_micros: __sdk::__query_builder::Col::new(
|
||||
table_name,
|
||||
"published_at_micros",
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
|
||||
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
|
||||
|
||||
#![allow(unused, clippy::all)]
|
||||
use super::visual_novel_gallery_view_row_type::VisualNovelGalleryViewRow;
|
||||
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
|
||||
|
||||
/// Table handle for the table `visual_novel_gallery_view`.
|
||||
///
|
||||
/// Obtain a handle from the [`VisualNovelGalleryViewTableAccess::visual_novel_gallery_view`] method on [`super::RemoteTables`],
|
||||
/// like `ctx.db.visual_novel_gallery_view()`.
|
||||
///
|
||||
/// Users are encouraged not to explicitly reference this type,
|
||||
/// but to directly chain method calls,
|
||||
/// like `ctx.db.visual_novel_gallery_view().on_insert(...)`.
|
||||
pub struct VisualNovelGalleryViewTableHandle<'ctx> {
|
||||
imp: __sdk::TableHandle<VisualNovelGalleryViewRow>,
|
||||
ctx: std::marker::PhantomData<&'ctx super::RemoteTables>,
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for access to the table `visual_novel_gallery_view`.
|
||||
///
|
||||
/// Implemented for [`super::RemoteTables`].
|
||||
pub trait VisualNovelGalleryViewTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Obtain a [`VisualNovelGalleryViewTableHandle`], which mediates access to the table `visual_novel_gallery_view`.
|
||||
fn visual_novel_gallery_view(&self) -> VisualNovelGalleryViewTableHandle<'_>;
|
||||
}
|
||||
|
||||
impl VisualNovelGalleryViewTableAccess for super::RemoteTables {
|
||||
fn visual_novel_gallery_view(&self) -> VisualNovelGalleryViewTableHandle<'_> {
|
||||
VisualNovelGalleryViewTableHandle {
|
||||
imp: self
|
||||
.imp
|
||||
.get_table::<VisualNovelGalleryViewRow>("visual_novel_gallery_view"),
|
||||
ctx: std::marker::PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub struct VisualNovelGalleryViewInsertCallbackId(__sdk::CallbackId);
|
||||
pub struct VisualNovelGalleryViewDeleteCallbackId(__sdk::CallbackId);
|
||||
|
||||
impl<'ctx> __sdk::Table for VisualNovelGalleryViewTableHandle<'ctx> {
|
||||
type Row = VisualNovelGalleryViewRow;
|
||||
type EventContext = super::EventContext;
|
||||
|
||||
fn count(&self) -> u64 {
|
||||
self.imp.count()
|
||||
}
|
||||
fn iter(&self) -> impl Iterator<Item = VisualNovelGalleryViewRow> + '_ {
|
||||
self.imp.iter()
|
||||
}
|
||||
|
||||
type InsertCallbackId = VisualNovelGalleryViewInsertCallbackId;
|
||||
|
||||
fn on_insert(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelGalleryViewInsertCallbackId {
|
||||
VisualNovelGalleryViewInsertCallbackId(self.imp.on_insert(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_insert(&self, callback: VisualNovelGalleryViewInsertCallbackId) {
|
||||
self.imp.remove_on_insert(callback.0)
|
||||
}
|
||||
|
||||
type DeleteCallbackId = VisualNovelGalleryViewDeleteCallbackId;
|
||||
|
||||
fn on_delete(
|
||||
&self,
|
||||
callback: impl FnMut(&Self::EventContext, &Self::Row) + Send + 'static,
|
||||
) -> VisualNovelGalleryViewDeleteCallbackId {
|
||||
VisualNovelGalleryViewDeleteCallbackId(self.imp.on_delete(Box::new(callback)))
|
||||
}
|
||||
|
||||
fn remove_on_delete(&self, callback: VisualNovelGalleryViewDeleteCallbackId) {
|
||||
self.imp.remove_on_delete(callback.0)
|
||||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn register_table(client_cache: &mut __sdk::ClientCache<super::RemoteModule>) {
|
||||
let _table =
|
||||
client_cache.get_or_make_table::<VisualNovelGalleryViewRow>("visual_novel_gallery_view");
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub(super) fn parse_table_update(
|
||||
raw_updates: __ws::v2::TableUpdate,
|
||||
) -> __sdk::Result<__sdk::TableUpdate<VisualNovelGalleryViewRow>> {
|
||||
__sdk::TableUpdate::parse_table_update(raw_updates).map_err(|e| {
|
||||
__sdk::InternalError::failed_parse("TableUpdate<VisualNovelGalleryViewRow>", "TableUpdate")
|
||||
.with_cause(e)
|
||||
.into()
|
||||
})
|
||||
}
|
||||
|
||||
#[allow(non_camel_case_types)]
|
||||
/// Extension trait for query builder access to the table `VisualNovelGalleryViewRow`.
|
||||
///
|
||||
/// Implemented for [`__sdk::QueryTableAccessor`].
|
||||
pub trait visual_novel_gallery_viewQueryTableAccess {
|
||||
#[allow(non_snake_case)]
|
||||
/// Get a query builder for the table `VisualNovelGalleryViewRow`.
|
||||
fn visual_novel_gallery_view(&self)
|
||||
-> __sdk::__query_builder::Table<VisualNovelGalleryViewRow>;
|
||||
}
|
||||
|
||||
impl visual_novel_gallery_viewQueryTableAccess for __sdk::QueryTableAccessor {
|
||||
fn visual_novel_gallery_view(
|
||||
&self,
|
||||
) -> __sdk::__query_builder::Table<VisualNovelGalleryViewRow> {
|
||||
__sdk::__query_builder::Table::new("visual_novel_gallery_view")
|
||||
}
|
||||
}
|
||||
@@ -414,7 +414,7 @@ impl SpacetimeClient {
|
||||
Ok(items
|
||||
.into_iter()
|
||||
.map(|item| {
|
||||
let mut record = map_puzzle_work_profile(item.into());
|
||||
let mut record = map_puzzle_work_profile_row(item);
|
||||
record.recent_play_count_7d = recent_play_counts
|
||||
.get(&record.profile_id)
|
||||
.copied()
|
||||
|
||||
@@ -228,10 +228,22 @@ impl SpacetimeClient {
|
||||
pub async fn list_square_hole_gallery(
|
||||
&self,
|
||||
) -> Result<Vec<SquareHoleWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.list_square_hole_works_with_input(SquareHoleWorksListInput {
|
||||
// 中文注释:公开广场只依赖 published_only,owner_user_id 用固定值通过输入校验。
|
||||
owner_user_id: "square-hole-public-gallery".to_string(),
|
||||
published_only: true,
|
||||
self.read_after_connect(move |connection| {
|
||||
let mut items = connection
|
||||
.db()
|
||||
.square_hole_gallery_view()
|
||||
.iter()
|
||||
.collect::<Vec<_>>();
|
||||
items.sort_by(|left, right| {
|
||||
right
|
||||
.updated_at_micros
|
||||
.cmp(&left.updated_at_micros)
|
||||
.then_with(|| left.profile_id.cmp(&right.profile_id))
|
||||
});
|
||||
Ok(items
|
||||
.into_iter()
|
||||
.map(map_square_hole_gallery_view_row)
|
||||
.collect())
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ use crate::mapper::{
|
||||
VisualNovelRunSnapshotRecordInput, VisualNovelRunStartRecordInput,
|
||||
VisualNovelRuntimeEventRecord, VisualNovelWorkCompileRecordInput, VisualNovelWorkProfileRecord,
|
||||
VisualNovelWorkUpdateRecordInput, map_visual_novel_agent_session_procedure_result,
|
||||
map_visual_novel_history_procedure_result, map_visual_novel_run_procedure_result,
|
||||
map_visual_novel_runtime_event_procedure_result, map_visual_novel_work_procedure_result,
|
||||
map_visual_novel_works_procedure_result,
|
||||
map_visual_novel_gallery_view_row, map_visual_novel_history_procedure_result,
|
||||
map_visual_novel_run_procedure_result, map_visual_novel_runtime_event_procedure_result,
|
||||
map_visual_novel_work_procedure_result, map_visual_novel_works_procedure_result,
|
||||
};
|
||||
|
||||
impl SpacetimeClient {
|
||||
@@ -239,10 +239,22 @@ impl SpacetimeClient {
|
||||
pub async fn list_visual_novel_gallery(
|
||||
&self,
|
||||
) -> Result<Vec<VisualNovelWorkProfileRecord>, SpacetimeClientError> {
|
||||
self.list_visual_novel_works_with_input(VisualNovelWorksListInput {
|
||||
// 中文注释:公开列表只依赖 published_only,owner_user_id 用固定值满足 procedure 输入契约。
|
||||
owner_user_id: "visual-novel-public-gallery".to_string(),
|
||||
published_only: true,
|
||||
self.read_after_connect(move |connection| {
|
||||
let mut items = connection
|
||||
.db()
|
||||
.visual_novel_gallery_view()
|
||||
.iter()
|
||||
.collect::<Vec<_>>();
|
||||
items.sort_by(|left, right| {
|
||||
right
|
||||
.updated_at_micros
|
||||
.cmp(&left.updated_at_micros)
|
||||
.then_with(|| left.profile_id.cmp(&right.profile_id))
|
||||
});
|
||||
Ok(items
|
||||
.into_iter()
|
||||
.map(map_visual_novel_gallery_view_row)
|
||||
.collect())
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user