Skip to content

support sqlite generated columns#1152

Merged
parsonsmatt merged 4 commits intomasterfrom
matt/sqlite-generated-columns
Nov 4, 2020
Merged

support sqlite generated columns#1152
parsonsmatt merged 4 commits intomasterfrom
matt/sqlite-generated-columns

Conversation

@parsonsmatt
Copy link
Collaborator

@parsonsmatt parsonsmatt commented Nov 4, 2020

Before submitting your PR, check that you've:

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Bumped the version number if there isn't an (unreleased) on the Changelog
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

@parsonsmatt parsonsmatt added this to the 2.11 milestone Nov 4, 2020
@parsonsmatt parsonsmatt merged commit 614b472 into master Nov 4, 2020
-- insert one or more rows, you need to use 'valuesToInsert entity' to
-- generate the list of values that you feed into your prepared
-- statement so that generated columns are properly scrubbed.
valuesToInsert :: PersistEntity entity => entity -> [PersistValue]
Copy link
Contributor

@friedbrice friedbrice Nov 4, 2020

Choose a reason for hiding this comment

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

I'm glad you changed this, because I just realized it introduces a bug in the Sqlite backend where adding a generated= attribute to a field (correctly) didn't make the field generated in the schema but (incorrectly) did redact the value when binding to a prepared statement <.<;

@parsonsmatt parsonsmatt deleted the matt/sqlite-generated-columns branch April 1, 2021 16:55
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