Skip to content

File Storage, Multi-Schema Writes & Row Decoding Fixes - #65

Merged
Einswilli merged 21 commits into
AllDotPy:masterfrom
Einswilli:new_design
Sep 15, 2026
Merged

Einswilli merged 21 commits into
AllDotPy:masterfrom
Einswilli:new_design

Conversation

@Einswilli

Copy link
Copy Markdown
Contributor

Summary

Add pluggable file storage with FileField/ImageField, extend multi-schema support to write operations, and fix row decoding for PostgreSQL.

File Storage

  • Storage abstraction: Storage trait (Rust) / ABC (Python) with LocalStorage, InMemoryStorage
  • FileField / ImageField: staging on assign, commit on save(), cleanup on delete()
  • FieldFile value object wrapping stored filename with read(), delete(), url, size
  • Config: [storage] block in ryx.toml + RYX_STORAGE_* env vars

Multi-Schema Write Path

  • bulk_insert, bulk_update, bulk_delete accept schema parameter across all backends
  • Model.save() and Model.delete() propagate schema from instance or Meta.schema
  • Manager.schema() and QuerySet.schema() chain correctly through CRUD
  • InsertBuilder.schema() for Rust API

Row Decoding Fixes

  • Integer fallback chain: i64 → i32 → f64 (handles int4/int8/float PKs from PostgreSQL)
  • decode_timestamp() tries NaiveDateTime before String fallback
  • Removed incorrect ::serial cast on INSERT

Migration Fixes

  • _render_default() properly converts Python defaults to SQL literals (True → TRUE, strings → escaped)
  • Callable defaults (e.g. UUID auto_create) excluded from SQL DEFAULT expressions
  • Schema introspection no longer falls back to SQLite PRAGMA on PostgreSQL

Tests

  • Unit tests: storage backends, FileField/ImageField, multi-schema write propagation
  • Integration tests: file storage end-to-end, PostgreSQL schema-scoped CRUD

Docs

  • file-storage.mdx: complete guide (backends, config, S3 example)
  • postgres-multi-schema.mdx: new "Writing Data" section
  • field-reference.mdx: FileField and ImageField entries

Einswilli and others added 21 commits August 17, 2026 10:31

@Wgoeh Wgoeh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job 👍🏾

@Einswilli
Einswilli merged commit edb7521 into AllDotPy:master Sep 15, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants