-
-
Notifications
You must be signed in to change notification settings - Fork 341
Common Table Expressions #1124
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
Merged
Merged
Common Table Expressions #1124
Changes from 202 commits
Commits
Show all changes
208 commits
Select commit
Hold shift + click to select a range
dde241e
A first implementation of common table expressions
trueqbit f8abfdb
Prepared for multiple CTEs
trueqbit 454a821
Multiple CTEs
trueqbit 0a9624c
Included util.h in storage.h
trueqbit 5c3d3aa
ad hoc storage implementation for expression
trueqbit 0ef34ff
Improve readability
trueqbit 31e204f
Curated storage implementation interface
trueqbit 3546af3
Explicit column names for CTE
trueqbit 8fb53cd
Cleanup code while programming CTEs
trueqbit 21f976a
Allow compound statements for recursive CTEs
trueqbit df34bb5
Complex recursive CTEs
trueqbit 3b8473f
Ability to order by nth column
trueqbit 805b2c9
Provided dump function for expressions
trueqbit 908dab4
Added cte.h to amalgamation script
trueqbit e4092bf
Added a few with-clause examples
trueqbit 85d92e1
Ability to select all columns from aliased table
trueqbit eb7971e
Removed 'get table' accessor from storage implementation
trueqbit 518677e
Validate number of columns of CTE
trueqbit 09703ec
Implemented simple multi-argument min/max core functions
trueqbit 5beffa1
Most CTE examples are available only with std::optional
trueqbit 024f427
"Apfelmaennchen" (Mandelbrot set) example
trueqbit c5aa19f
#include <optional> in CTE examples file
trueqbit d8fd046
Abstracted table object mapping
trueqbit c6b461f
Renamed `label_type` typename alias to `cte_label_type`
trueqbit ff086f6
Renamed common_table_expression::expression -> subselect
trueqbit 532c430
Ability to build storage columns by integral member pointer constant
trueqbit 749ce47
Implemented getting column expression from aliased asterisk expression
trueqbit c772d09
Static unit tests for column expression types
trueqbit 7582330
Added explicit as() call CTE builder
trueqbit 1ec9350
Provided `polyfill::remove_cvref` for C++17
trueqbit 8f8e991
Moved `column_expression_of_t` machinery to its own respective header…
trueqbit 7d94059
Corrected column expression for reference wrapper
trueqbit 5e46868
Added static unit tests for 'column pointer'
trueqbit dced338
Updated sqlite_orm.h
trueqbit fe5ba65
Simplified and described storage lookup methods
trueqbit 917c34b
Addressed compiler errors found with clang (LLVM 12)
trueqbit 45018e1
Addressed issues while compiling all examples and unit tests
trueqbit 13807c7
Removed unused system_error variable in unit tests
trueqbit 4030227
`tuplify` metafunction must do what it is supposed to do
trueqbit 757c9a9
Ability to refer back to a CTE column via column alias
trueqbit 357cf3f
Runner-up: Ability to refer back to a CTE column via column alias
trueqbit f600ca9
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 5a33340
Restored parentheses around VALUES expression
trueqbit 83d7fe4
make_error_code can now be called unqualified
trueqbit b28bfe1
Updated unit tests in regard to expected serialized statements
trueqbit 8c92323
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 8f74a98
Merged upstream/dev into CTEs
trueqbit 1f9a132
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 16a100e
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit c3f72ed
Updated code after merge
trueqbit 9581d8f
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 1b9e53c
Replaced `constexpr const` variable declarations
trueqbit 015027f
Renamed `alias_exctractor::get()` -> `alias_exctractor::extract()`
trueqbit 8fdce3a
Properly unquote collected CTE column names
trueqbit 57e4bb3
Reused sqlite_orm's alias concept for CTE tables
trueqbit 97c9bdf
Updated CTE examples, using new column pointer syntax abilities
trueqbit 3490ca0
Updated sqlite_orm.h
trueqbit 089ea5a
Simplifications, fully leveraging alias mechanism for CTEs
trueqbit 78ae741
Fully implemented explicit CTE columns
trueqbit 0a891da
Runner-up: Fully implemented explicit CTE columns
trueqbit 93ecf55
Unit tests for explicit CTE column references
trueqbit a9e1390
Confined using numeric column aliases within a single CTE
trueqbit 865611d
Same wording for "C++nm or later"
trueqbit 059be69
Updated sqlite_orm.h
trueqbit 2414ea7
Updated apfelmaennchen C++20 select statement
trueqbit 7271bcb
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 5e62621
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 5cfa693
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 14400e9
Capture support for class types as non-type template parameters in macro
trueqbit f7de21e
Used 'support' macro for C++20 non-type template parameter features
trueqbit 08cadb2
Added 'node tuple' and 'ast iterator' unit tests for CTEs
trueqbit 42b138f
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit e76c2d1
Made CTE column references work with getters
trueqbit ddfc2db
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 32bf564
Fixed getting table_type's object
trueqbit c7e58ed
Added example selecting columns from a subquery, using an explicit CTE
trueqbit ab3b0a1
Use feature detection macros for polyfills
trueqbit f69701e
Context-sensitive alias extraction
trueqbit ca18031
Added unit tests for alias extraction
trueqbit f918940
Merge remote-tracking branch 'refs/remotes/upstream/dev'
trueqbit fa15bae
Corrected CTE column referencing backend code
trueqbit 0291bbf
Removed ability to reference columns by index
trueqbit 4449515
Simplified string identifier template
trueqbit 3ca30b4
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit ac94ea4
Cleanup CTE code
trueqbit 2da31e0
CTE available from C++17 and later
trueqbit cd35ef4
Fixed compilation error on clang
trueqbit cc7e6be
Cleaned up remnants of pre-1.8 merge
trueqbit dfd0e0d
Optimized copying explicit CTE column string
trueqbit c70f111
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 8ffdcbc
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 98738a8
Made column aliases first-class citizens
trueqbit c6af050
Correct shadowed template parameter
trueqbit a2fddcb
Ability to daisy-chain the concatenation operator
trueqbit 304fee3
EXISTS must use parentheses
trueqbit 881115b
Aliasing of CTE aliases
trueqbit a6c6b46
Sudoku as another outlandish CTE query example
trueqbit 4d7b911
Runner-up: Ability to daisy-chain the concatenation operator
trueqbit 852e572
Trying to fix compiler errors with clang
trueqbit b756bd4
Merge branch 'dev' into CTEs
trueqbit f65156e
Corrected availability of `is_cte_alias_v`
trueqbit 46cf220
Aliased columns mapped into a CTE
trueqbit 00d159b
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 8c4a198
Addressed a few CTE+clang related things
trueqbit 026d37c
Removed code used in local test environment
trueqbit 26b323a
Included <algorithm> in tuple_traits.h
trueqbit 3d349d4
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 8de0b38
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 99ad4f3
Qualified remaining calls to `std::move()`
trueqbit 3d2f3a3
Removed code used in local test environment
trueqbit 2c69e87
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 9404d5d
Made CTE select work with a `columns_t` expression having only 1 column
trueqbit c53d72b
Fixed collecting CTE column names from column aliases
trueqbit 89c2882
Updated example using the newer `group_by().having()` expression
trueqbit 22705d3
User retention calculation example using CTEs
trueqbit dcf07ea
Trying multi-processor compilation for appveyor builds
trueqbit 8ff7f20
Fixed missing `column_expression_of_t`
trueqbit ecdd32a
Trying multi-processor compilation for appveyor builds except for gcc
trueqbit 3beab49
Merge branch 'dev' into CTEs
trueqbit b33fe3c
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit b8f9862
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 74f8e64
'greatest n per group' using a self-join
trueqbit 84cb56c
Simplified a few internal CTE-related things
trueqbit 70dc5ac
Merge branch 'aliasing_1st' into CTEs
trueqbit 94b1fc6
Updated sqlite_orm.h
trueqbit 209c196
Fixed a few things detected with clang
trueqbit f3d9ff9
Must not guard `#include`s subject to amalgamation
trueqbit 14d9125
Merge branch 'aliasing_1st' into CTEs
trueqbit 5b1d723
Removed artificial constraint on single-character CTE aliases
trueqbit ef444ec
Removed '_col' suffix from columns in CTE examples
trueqbit dc7a118
Removed superfluous fold expression preprocessor guard
trueqbit 89466cd
appveryor: Updated build worker image name for clang C++20
trueqbit b520578
Replaced SFINAE on `cte<>()` with concepts
trueqbit 6bf1bdb
Renamed 'CTE label' and 'CTE alias' to 'CTE moniker'
trueqbit 83783c9
Simplified storage lookup
trueqbit aefc77e
Fixed making CTE 'storage'
trueqbit b2c528e
Used `is_compound_operator` in more places
trueqbit 112d712
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 09d6d3a
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 1014cc9
Improved performance of `index_sequence_value()`
trueqbit 6cb05c5
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit d74bee2
Updated EOL sequence in CTE header files to LF
trueqbit 0c699f3
Removed comment in index_sequence_util.h
trueqbit c08a16a
Guarded availability of `operator->*` for CTE monikers
trueqbit 11df357
Fix warning in json1 unit test
trueqbit d712608
Fixed C++17 compiler error in `index_sequence_value()`
trueqbit 205f533
Turned `column<>` function object into function again
trueqbit 0f2f78a
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit a833b4a
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 8fda24c
Column pointers and overloading operators
trueqbit dbe1784
Overhauled operator overloading
trueqbit 4bc87f6
Added schema subfolder
trueqbit 4cb7237
Updated clang-format lint action to v0.16.2
trueqbit ed1d446
Small improvements to CTE examples
trueqbit ffcfc30
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit bb95d10
Removed global numbered CTE moniker types
trueqbit 2d3c8fc
Convenience function for constructing a CTE by directly using a moniker
trueqbit 5e14f8c
Merge remote-tracking branch 'refs/remotes/upstream/dev'
trueqbit 8bfbca0
Corrected test file ast_iterator_tests.cpp
trueqbit ff0f66a
Renamed cte.h -> cte_moniker.h
trueqbit 5ffcc6a
Fixed unit test for "aliased CTE column alias"
trueqbit 9190088
Fixed unit test for aliased CTE column
trueqbit ade3190
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit c477ac9
Create a CTE using `as()`
trueqbit 96043a1
Serialized `WITH` keyword differently
trueqbit ee5aba1
Provided optional `WITH RECURSIVE`
trueqbit 5d2a8d8
Simplified a few node expressions involving comparisons with aliases
trueqbit 843f667
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit e8bfdb4
Unit tests for with select from CTE directly from storage object
trueqbit 135733b
Guarded storage tests for CTEs
trueqbit c928cf4
First implementation of CTEs with materialization hints
trueqbit 4fedb37
Improved CTE example fetching a hierarchy
trueqbit f1b2e36
Allow "compound" statements in with-clause
trueqbit f484fca
Count asterisk from CTE using C++20 aliases
trueqbit 28d99bf
Corrected unit tests for aggregate functions
trueqbit f9eb74e
Clarified comment on `alias_extractor` a bit
trueqbit ab013e6
Relaxed forming a column reference to an aliased table column pointer
trueqbit d77fa59
Operators for column references to aliased table columns
trueqbit c370dca
Merge remote-tracking branch 'origin/alias_column_operators' into CTEs
trueqbit 2bbf149
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 60954f2
Merge branch 'multi-compound' into CTEs
trueqbit e3d9cc2
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit b1c9dfc
A few more CTE unit tests
trueqbit baf801e
Properly guarded CTE alias column operator under C++20 aliases
trueqbit f4745e6
Guarded CTE column operator under C++20 aliases
trueqbit b7213ab
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit f6e1c97
Corrected unit tests for table name collector
trueqbit 6b0613d
Uniform syntax for column pointer expressions through table references
trueqbit 57b5097
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 348a803
Further unit tests for CTE expressions
trueqbit 3a9665b
Table reference can be specified in call to `make_table()`
trueqbit 4d68adf
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 3c914e5
CTE with raw insert statements
trueqbit 6b406c5
Merge remote-tracking branch 'origin/fixes/operators_adl' into CTEs
trueqbit fe696b6
Moved CTE string literal operators into inline namespace
trueqbit 31c6d30
Merge remote-tracking branch 'origin/fixes/operators_adl' into CTEs
trueqbit 508d0d7
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit b2c77f2
Rephrased comment
trueqbit 5ef6d4e
Merge remote-tracking branch 'origin/simplified_expression_object_typ…
trueqbit fcf85d6
Streamlined tuple traits and algorithms
trueqbit 8e67751
Merge branch 'streamlined_tuple_algos' into CTEs
trueqbit 60eb1a8
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit 32fef04
Applied changes requested in PR review
trueqbit 4997b7d
Use of a string_view for serialization in several places
trueqbit 21a1a63
Used standardized time types
trueqbit 18b27ac
appveyor: Updated vcpkg environment to 2024.03.25
trueqbit 4f4155a
Silenced warning 'expression result unused'
trueqbit 312aef2
Merge remote-tracking branch 'upstream/dev' into CTEs
trueqbit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.