Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Row descriptions #331

Merged
merged 2 commits into from
Apr 11, 2018
Merged

Improve Row descriptions #331

merged 2 commits into from
Apr 11, 2018

Conversation

groue
Copy link
Owner

@groue groue commented Apr 11, 2018

This PR improves the formatting of Row's description and debugDescription in order to help debugging.

(lldb) po ["name": "foo", "name": "bar", "score": nil] as Row
[name:"foo" name:"bar" score:NULL]

The changes are most visible in adapted rows, and especially rows that contain scopes:

(lldb) po try Row.fetchOne(db, "SELECT 0 AS a, 1 AS b, 2 AS c", adapter: ScopeAdapter(["suffix": SuffixRowAdapter(fromIndex: 1)]))!
▿ [a:0 b:1 c:2]
  unadapted: [a:0 b:1 c:2]
  - suffix: [b:1 c:2]

This PR is intended to bring support for Associations, which will rely heavily on adapted rows, and will sometimes need this debugging tool.

@groue groue mentioned this pull request Apr 11, 2018
29 tasks
@groue groue added this to the GRDB 3.0 milestone Apr 11, 2018
@groue groue merged commit d08f630 into GRDB3 Apr 11, 2018
@groue groue deleted the GRDB3-RowDescription branch April 11, 2018 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant