Skip to content
Discussion options

You must be logged in to vote

@cameronmcefee SQLite calls these "generated columns," and StructuredQueries has support documented here: https://swiftpackageindex.com/pointfreeco/swift-structured-queries/~/documentation/structuredqueriescore/definingyourschema#Generated-columns

Note that generated columns are limited to static information available to the table they're defined on and cannot refer to dynamic information (like the current date) or data from other tables. In these cases you do want to define a dynamic helper as you show above, and select this data directly from the query builder.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by cameronmcefee
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants