Skip to content

fix(query_builder): keep working on pydal 3 as well as current pydal - #20

Closed
robinvandernoord wants to merge 1 commit into
masterfrom
ccr-434ee1f8-x5zxar
Closed

robinvandernoord wants to merge 1 commit into
masterfrom
ccr-434ee1f8-x5zxar

Conversation

@robinvandernoord

Copy link
Copy Markdown
Member
  • QueryBuilder in belongs(): pydal 3 compiles subselects from Select._db/_query/_attributes
    instead of calling _compile(). Expose the same (query, fields, kwargs) that to_sql() renders,
    so relationship handling is preserved.
  • distinct=(a, b): pre-join the normalized names into one fragment; pydal 3 runs xorify()
    on lists, which fails on plain strings.
  • _insert/_update/_delete: return pydal's result unchanged instead of str(), so bound params
    (pydal 3 ParamSQL) are not stripped.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01WnVuQ2ohUGVQ33KvucZYk6

- QueryBuilder in belongs(): pydal 3 compiles subselects from Select._db/_query/_attributes
  instead of calling _compile(). Expose the same (query, fields, kwargs) that to_sql() renders,
  so relationship handling is preserved.
- distinct=(a, b): pre-join the normalized names into one fragment; pydal 3 runs xorify()
  on lists, which fails on plain strings.
- _insert/_update/_delete: return pydal's result unchanged instead of str(), so bound params
  (pydal 3 ParamSQL) are not stripped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WnVuQ2ohUGVQ33KvucZYk6
@robinvandernoord
robinvandernoord marked this pull request as draft October 2, 2026 07:01
@robinvandernoord
robinvandernoord deleted the ccr-434ee1f8-x5zxar branch October 5, 2026 09:31
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