0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00
Commit Graph

54 Commits

Author SHA1 Message Date
rbock
cf83978118 Migrated select clauses to returning wrapped asserts
This helps a lot in testing static asserts (and debuging expressions
with MSVC)
2016-09-01 12:06:40 +02:00
rbock
712c79cb8a Added static_assert tests for dynamic from.add() 2016-03-24 19:54:16 +01:00
rbock
dec3f5b3df Migrated from::add() to portable static assert 2016-03-23 08:20:52 +01:00
rbock
cf9ec10ae4 Added table checks for dynamic_join(x).add(y) 2016-03-22 09:23:37 +01:00
rbock
a836e8c8d8 Simplified where() to have one argument only 2016-03-20 09:13:50 +01:00
rbock
b6c5cb8764 Added several serialization tests for from() and joins 2016-03-20 09:13:49 +01:00
rbock
d15cb2a410 Added "real" cross join 2016-03-20 09:13:49 +01:00
rbock
20adfb66c9 Made from() testable with portable static asserts, added tests
Added cross_join_t, simplifying join a lot
2016-03-20 09:13:49 +01:00
rbock
15247504f2 Disallow unconditional join (ifdef to get it back)
One day, users of the library have to make the switch anyway, why not
today?
2016-03-20 09:13:49 +01:00
rbock
5e96551f83 Prevent unconditional joins, and naked bool in where() or boolean expressions
- `.from(t1, t2)` produces an unconditional join if you forget to add a condition in the .where()
  sqlpp11 therefore now deprecates unconditional joins.
- more often than not, writing  something like `where(name == "doe")`, you
  meant to write `where(t.name == "doe")`. It is hard to find bugs when
  the former expression compiles because you happen to have a variable
  `name` in the current scope as well.
  sqlpp11 therefore now deprecates `.where(bool)` and disallows
  raw bool values boolean expression like `something and bool`
  wrap bools in sqlpp::value(), if you REALLY want a bool value here
2016-03-20 09:13:49 +01:00
rbock
bab5b6d8ee Merge branch 'develop' of https://github.com/isliser/sqlpp11 into isliser-develop
Conflicts:
	include/sqlpp11/where.h
2015-12-27 19:57:42 +01:00
sliser
46cb009ba4 added comments regarding msvc bug workarounds 2015-12-27 11:26:29 +03:00
sliser
4e898368fa fixed gcc build 2015-12-16 09:41:01 +03:00
sliser
a6f506b57f fixed build for msvs 2015 update 1 2015-12-15 18:20:33 +03: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
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
73097e989f Mapping ctes to cte_references when used in from, helping with serialization 2015-02-11 19:06:16 +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
9110f6653a Reduced error messages for several clauses 2014-11-29 14:02:24 +01:00
rbock
f62891d25f Merged _member and _methods in clauses to _base
This makes statement_t look much nicer and use less inheritance
2014-11-29 11:10:01 +01:00
rbock
36d1a85339 Reduced error messages for insert value lists 2014-11-27 23:11:46 +01:00
rbock
443614a0e7 Reduced compiler error spew dramatically for from and having. 2014-11-27 22:16:12 +01:00
rbock
0e27cd7138 Added serialize checks for dynamically added stuff 2014-11-26 10:02:48 +01:00
rbock
935baebedb Added more specific static asserts for the consistency checks 2014-11-25 21:46:09 +01:00
rbock
809d42e4a1 Introduced check for serializability 2014-11-25 17:43:55 +01:00
rbock
59734b3f51 Moved static asserts for inconsistency errors much closer to call site 2014-11-17 19:05:22 +01:00
rbock
6677266bf5 Added free function versions of select_column_list and from 2014-11-17 13:17:10 +01:00
rbock
4ac4b1820b Removed stray sqlpp namespace qualifiers
The usage was very inconsistent. Also, I just saw that the current VC++
cannot deal with qualifiers in combination with template aliases
2014-08-27 20:43:09 +02:00
rbock
3dfed5b85c Added derived_statement_t alias 2014-08-27 20:10:31 +02:00
rbock
a4429f0f19 Sprinkled in a few const qualifiers 2014-08-27 09:23:07 +02:00
rbock
e59dc3862a An alias for creating a new statement type 2014-08-25 21:22:22 +02:00
rbock
dd33b8096e Streamlined type traits a bit 2014-07-28 06:54:54 +02:00
rbock
1f20d244c7 Added improved check for potential name duplicates in from() 2014-06-26 18:56:07 +02:00
rbock
1267aa252f Added _check_consistency call to all statement parts
For instance, enforce where() to be called
2014-06-24 21:53:25 +02:00
rbock
5f927572cf Took care of a few warnings 2014-06-14 20:25:11 +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
060d59125c Moved files from sqlpp11/vendor to sqlpp11 2014-06-13 18:51:51 +02: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
afcc62fc75 Added interpreters for a bunch of functions and table aliases 2014-01-15 19:42:14 +01:00
rbock
1d3ea8516f interpreter for from() 2014-01-12 15:45:50 +01:00
Roland Bock
b031bda5fc Can now prepare a select (tested with mysql) 2013-12-28 22:52:54 +01:00
Roland Bock
5304e77f4a Streamlined usage of dynamic and non-dynamic method versions
from, where, having, group_py, order_by, using.

Prepared on() as well
2013-11-16 18:36:05 +01:00
Roland Bock
4b4048bd11 Unified interface for where and dynamic_where.
Compatible with previous interface.
Both where and dynamic where can now take a variable amount of
arguments. where() requires at least one argument.
2013-11-16 09:37:38 +01:00
Roland Bock
2e7d5478f6 Added dynamic functions to insert, remove and update 2013-09-30 07:46:50 +02: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