Commit Graph

45 Commits

Author SHA1 Message Date
rbock c09a0b5ee8 Use clang-format to explicitly mark unused parameters 2017-09-10 14:58:51 +02:00
rbock 306ce63f2f Use clang-format to add closing namespace comments 2017-09-10 14:56:51 +02:00
rbock ac765993aa Use clang-format to streamline include guards 2017-09-10 14:55:11 +02:00
rbock b41f1add8c Made no_value to a more complete value type
This allows to select NULL via a case statement (seems to make more
sense than disallowing it).
2015-12-23 16:01:45 +01:00
rbock 09f23cea0a Reformatted using clang-format
Please use clang-format before submitting code, e.g via the pre-commit
supplied in the repo (thanks AndiDog)
2015-09-13 21:33:19 +02:00
Reto Schneider 5756b2355f Remove trailing spaces. 2015-08-05 14:43:21 +02:00
rbock 34376bdd28 Fixed compile error for clang-3.4 and gcc-4.8 2015-07-05 13:40:06 +02:00
rbock bbe933f943 count is the first auto-aliased function
If used in an expression, count does not have an alias.
If used as a field in a select, it does have an alias.
2015-07-05 11:08:13 +02:00
rbock 8d356f55ce Fixed warnings about unused parameters 2015-05-30 16:19:23 +02:00
rbock 1e9910b12f Replaced node tuple by node type vector 2015-02-17 08:03:19 +01:00
rbock 436ef67072 Replaced recursive traits with local traits which are evaluated recursively
Ok, that sounds weird...

Earlier, each node in the SQL tree had a struct containing all recursive
traits. This is now gone. It only contains a reference to all sub nodes
and its own specific traits.
2015-02-17 07:05:41 +01:00
rbock 97de6fad7f Adjusted license dates 2015-02-15 19:00:21 +01:00
rbock 74cafe35dd We now have unique name representations per name
Before this, there could be multiple classes representing multiple id
columns. Now there is one class representing ALL the name "id". Very
important for analyzing potential name clashes.
2014-11-30 19:40:34 +01:00
rbock f02a9ce3d0 Moved logic functions from detail into logic namespace 2014-11-29 14:29:54 +01:00
rbock 809d42e4a1 Introduced check for serializability 2014-11-25 17:43:55 +01:00
rbock ef0672a97a Minor cleanup 2014-09-26 16:33:47 +02:00
rbock 7c80a2a6e0 Renamed named_expression to selectable 2014-09-26 09:03:26 +02:00
rbock 64c4ba029f Adjusted usage of wrong_t.
I think there was a risk of wrong_t based static_asserts firing, if the
template parameters are used. Anyway, this is shorter.
2014-07-31 09:08:00 +02:00
rbock dd33b8096e Streamlined type traits a bit 2014-07-28 06:54:54 +02:00
rbock 39413ee1bb Added check to prevent multicolumns in sub selects 2014-06-28 21:02:49 +02:00
rbock 269f2e7e17 Fixed indentations 2014-06-14 07:45:10 +02:00
rbock 09d220541e removed namespace vendor 2014-06-14 07:43:27 +02:00
rbock c4a02d931c SelectTypeTests compile again! 2014-05-20 21:22:55 +02:00
rbock 1d905e1db5 Ok, the first few lines of test code compile again. 2014-05-15 23:47:16 +02:00
rbock d062c1a0d8 Started to rewrite traits and recursive traits
traits are shorter and easier to identify by using tags in a variadic
template

recursive traits can be automatically derived, which makes it much
easier to add new traits to be handed through the expression tree.
2014-05-15 08:00:03 +02:00
rbock 331353022a Rewrote all_t to use bool arguments instead of predicate and classes 2014-05-01 17:34:47 +02:00
rbock dba5c992ed Added _table_set to select_column_list.h 2014-03-28 18:10:58 +01:00
rbock bef4d0874b Updates copyright year 2014-03-27 16:43:36 +01:00
rbock 555aba3f14 Rewrote type-set operations to look more like free functions 2014-03-19 18:59:39 +01:00
rbock abf4bb8e9a Added serializer to interpreter
The serializer has partial specializations for all templates. It is a
good basis if the connector/database requires strings close to the
standard.

The interpreter is unspecialized (and uses a static assert to say so).
It is a good basis if the connector/database requires a different
interpretation, e.g. re-writing the expression tree.

The interpretable_t implements three methods for interpretation:
serializing with the sqlpp::serializer_context, serializing with the
database's serialization context and interpretation with the database's
interpretation context.
2014-02-18 17:45:08 +01:00
rbock 61a4797d0b Simplified syntax for multi_columns a lot
Instead of

multi_column(alias, columns...)

it is now

multi_column(columns...).as(alias)

Also, you can now write:

all_of(table).as(alias)
2014-02-13 10:07:51 +01:00
rbock 5b67061fca Fixed multi_column to handle all_of again 2014-02-08 17:12:40 +01:00
rbock b82a0295cf Fixed all_of use in select 2014-02-08 16:29:21 +01:00
rbock c5ef725106 Removed the dreaded make_expression_tuple and make_flag_tuple 2014-02-07 23:51:21 +01:00
rbock e1f619eecb Replaced a bunch of make_set_if::size asserts with and_t/or_t 2014-02-02 18:45:21 +01:00
rbock 9c75c7b873 Removed a whole lot of unnecessary(?) perfect forwarding.
The code is much easier to read, the optimizer should take care of
pretty much everything, AND it copiles even faster without the code
being riddled with std::forward and std::decay
2014-01-30 08:43:55 +01:00
rbock 9bcae0867f Moved "wrong" template to namespace vendor 2014-01-29 14:28:07 +01:00
rbock 87302fa27f Make g++-4.8 compile again 2014-01-18 16:10:46 +01:00
rbock 312e735d6d Moved a bunch of things into namespace vendor
This namespace is for things the developer will not get in touch with
(normally) but the vendor might need to use for specialization of the
interpreter.

This separation is not fully completed yet, some changes will have to
follow...
2014-01-18 15:50:16 +01:00
rbock 9826ef79e4 Added interpreters to is_null, multi_column, alias and select pseudo table 2014-01-16 22:31:43 +01:00
Roland Bock d0d5fd2969 Replaced tag_yes and tag_no by std::true_type and std::false_type 2013-09-29 09:02:51 +02:00
Roland Bock 161da75723 Stripped a lot of superfluouos type information from result rows.
Moved member template into name class to utilize the fact the class
aliases are really just aliases.
This makes the code leaner in many cases and less complex for the compiler
(I guess). It also has the benefit, that the field name is available as
string in the result_rows. This might be useful for debugging one day.
2013-09-13 09:18:15 +02:00
Roland Bock b7c13e3974 Expand tab -> all_of(tab) in multi_column 2013-08-17 11:25:05 +02:00
Roland Bock 4ea28cac4b Added support for g++-4.8 2013-08-15 11:54:20 +02:00
Roland Bock e6f086bbfa Cleaned up directory structure. 2013-08-14 06:34:11 +02:00