rbock
bef4d0874b
Updates copyright year
2014-03-27 16:43:36 +01:00
rbock
c0595aa6f2
Fixed compile-error for parameter
...
(need to do the same for other value types, too)
2014-03-27 09:25:35 +01:00
rbock
1a347048df
Migrated remove and update to using arg_selector
2014-03-27 08:37:05 +01:00
rbock
1a39d31b3e
Using arg_selector for select
2014-03-26 21:11:40 +01:00
rbock
6c4520a632
Using detail::arg_select to reduce number of constructors
2014-03-26 21:03:29 +01:00
rbock
1ffa6e25ba
Added an argument selector
...
It returns the "correct" argument out of two.
2014-03-26 21:02:22 +01:00
rbock
1c95406ced
Improved error messages for incorrect parameters.
2014-03-26 21:01:16 +01:00
rbock
a38a9d6f65
Made a bunch of compile errors easier to read
...
Fixed a few bugs in the process, too.
Probably also created a few, need better checks for resulting
statements.
2014-03-23 20:54:44 +01:00
rbock
555aba3f14
Rewrote type-set operations to look more like free functions
2014-03-19 18:59:39 +01:00
rbock
82dc280b1b
Added executed select tests
2014-03-18 08:28:17 +01:00
rbock
1824f9cde0
Changed NULL handling in results.
...
If the column or the connector indicates that NULL corresponds to a
trivial value, then the trivial value is returned. Otherwise, an
assert fails or an exception is thrown, depending on the preferences of
the connector.
2014-03-13 08:52:22 +01:00
rbock
78d2d9e67a
Renamed tvin_wrap to maybe_tvin
...
Easier to read
2014-03-11 18:46:53 +01:00
rbock
6cffdb6428
Added is_trivial_value_is_null interpretation to assignment
2014-03-07 08:53:32 +01:00
rbock
67f1b09acb
Added prepare_select to MockDb.
2014-02-21 09:43:23 +01:00
rbock
8c8b95d14e
Added template parameter Db to result_entry
2014-02-21 07:24:07 +01:00
rbock
b7935b61d5
Added some (no-op) statement executions
2014-02-21 06:02:49 +01:00
rbock
3bbe343a77
Added a better MockDb that can execute statements
...
Currently all executions are no-ops, but it will be rather simple to
yield select results too (to be configured at runtime).
2014-02-20 09:24:06 +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
26f322b86a
Expressed equal_to, not_equal_to, logical_not as binary/unary expressions
2014-02-16 19:32:43 +01:00
rbock
1d5ee2068d
Fixed a bunch of bugs found while adjusting the mysql connector
2014-02-16 13:16:09 +01:00
rbock
8b37626b89
Added uniqueness constraint to type_set, plus minor cleanup
2014-02-16 12:43:09 +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
9e8979c6f0
Fixed a bunch of small errors and shorted compile error messages
2014-02-13 08:44:09 +01:00
rbock
fb092583cc
Made wrong_t<...> a true std::false_type again.
...
I am sure this would shoot me in the foot some day otherwise
2014-02-11 10:17:02 +01:00
rbock
7c928ae6d0
Added table sets to several more expressions
2014-02-10 19:55:48 +01:00
rbock
54687c5e69
Added a bunch of static asserts to prevent misuse of insert and update
...
There are quite a few more to be inserted
2014-02-10 17:56:16 +01:00
rbock
e4c7b5235f
Added several checks for correct types in insert columns/values
2014-02-10 09:46:31 +01:00
rbock
82bcd63efd
Removed the dreaded crtp_wrapper and the policy_wrapper
2014-02-09 23:45:17 +01:00
rbock
22c43358f2
All statements back to composite design
...
The point is that even though the CRTP code looked nice, it was too hard
to comprehend.
2014-02-09 23:30:30 +01:00
rbock
cc76820870
Migrated insert and remove back to composite design
2014-02-09 18:14:52 +01:00
rbock
ae2f1948ac
Added checks to prevent non-matching columns from being inserted
2014-02-09 15:06:42 +01:00
rbock
61ed1d9f37
Corrected inconsistency in select value_type
2014-02-08 23:48:35 +01:00
rbock
88fc0959b5
Added value type back to select
2014-02-08 22:50:26 +01:00
rbock
3c6e7cb89a
Fixed a bunch of smaller migration errors
2014-02-08 22:24:05 +01:00
rbock
68750aac80
Refactored insert to use policies
...
Much cleaner now.
2014-02-08 21:06:23 +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
f7aa56b7dc
Fixed possible dangling references problem
2014-02-08 00:43:20 +01:00
rbock
3a875e794b
More reasonable dynamic limit and offset
2014-02-08 00:35:59 +01:00
rbock
c5ef725106
Removed the dreaded make_expression_tuple and make_flag_tuple
2014-02-07 23:51:21 +01:00
rbock
0a744455ec
basic select methods work again
...
I've let go of the select(flags, columns) monster methods, these are now
separated
2014-02-07 23:43:26 +01:00
rbock
62b828ef8f
Migrated select components to support policy based select
2014-02-07 22:52:02 +01:00
rbock
9c4832df0f
Switched remove to policy based design.
...
A lot of sweating to figure out how to do it, but now it looks MUCH
cleaner and it is probably a lot easier to extend :-)
2014-02-07 21:25:23 +01:00
rbock
417d317a65
Added a bunch of operator interpretations
2014-02-05 10:12:07 +01:00
rbock
7afd34c349
Added a few types/templates to help with expression tree evaluation
2014-02-04 07:32:37 +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
14c382db59
Added and_t and or_t templates
2014-02-02 18:43:07 +01:00
rbock
d288c65897
Minor code cleanup (set -> type_set)
2014-02-02 14:58:08 +01:00
rbock
28fc5900f2
Added missing overload for prepared statement parameters
2014-02-01 14:28:23 +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
b90eb7192a
Renamed run and prepare methods to _run and _prepare
...
_methods are to be used by vendors
2014-01-29 13:11:11 +01:00
rbock
375dec25f8
Minor code cleanup
2014-01-28 18:03:14 +01:00
rbock
687fe13055
Added constness to char_result_row characters
2014-01-28 06:56:30 +01:00
rbock
25c1cfb399
Cleanup some minor bind issues
2014-01-28 06:50:21 +01:00
rbock
d85fdcd62b
Removed unnecessary header
2014-01-27 18:50:22 +01:00
rbock
05ca005e1b
Fixed bug in text results
...
text results never had a reasonable length
2014-01-27 13:40:52 +01:00
rbock
a9cfe534ef
Fixed serialization of multi-row inserts
2014-01-27 12:48:24 +01:00
rbock
dda4fc2586
Small fix in result row
2014-01-27 12:12:38 +01:00
rbock
471dffebc0
Updated joins and updated columns to work with sqlite3
...
The new behaviour is closer to the standard, I think
2014-01-27 11:47:22 +01:00
rbock
d4d8429947
Added missing include directive
2014-01-26 22:58:38 +01:00
rbock
4869758e35
Renamed query -> statement
2014-01-26 22:39:44 +01:00
rbock
dfcd372611
tvin works with const char*, too
2014-01-26 15:44:44 +01:00
rbock
b0e7395f47
Using assignments in add_values now
...
This makes mistakes much less likely
2014-01-26 15:09:30 +01:00
rbock
5ef5259988
Added columns and add_values to insert for multi row inserts
...
Need to change add_values method to use assignments, though.
2014-01-26 13:24:42 +01:00
rbock
f802300685
Added sqlpp::null and sql::default_value for insert and update
2014-01-25 22:38:16 +01:00
rbock
f443564d62
Minor code cleanup
2014-01-24 00:31:53 +01:00
rbock
019a920739
Added a .where(bool) to choose all or no row
2014-01-22 22:53:23 +01:00
rbock
6e55f8f6cd
Fixed a few bugs found during mysql tests
2014-01-22 18:35:08 +01:00
rbock
abce8592e6
Added DISTINCT flag to avg and sum
2014-01-22 09:31:36 +01:00
rbock
34f6c7a2eb
Added optional DISTINCT flag to count
2014-01-21 23:42:27 +01:00
rbock
a22b07aa03
Added more tests (and fixes) for dynamic columns and flags
2014-01-21 09:50:58 +01:00
rbock
075e63c486
Added test for (empty) dynamic select flag list
2014-01-20 23:17:07 +01:00
rbock
ee7cda0a5d
Started to change the way dynamic columns and flags are specified
2014-01-20 21:26:16 +01:00
rbock
7992a82615
Some notes
2014-01-20 10:48:28 +01:00
rbock
31127812a0
Added some template aliases to ease specialization and added a few more operator overloads
2014-01-19 18:11:05 +01:00
rbock
63ac89accb
Fixed some "const" bugs and a parameter_tuple bug
2014-01-18 22:40:13 +01:00
rbock
24b44fae65
Re-animated all tests
2014-01-18 20:58:51 +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
93129be748
Added missing interpreter specializations, especially for serializable
2014-01-17 09:56:35 +01:00
rbock
9826ef79e4
Added interpreters to is_null, multi_column, alias and select pseudo table
2014-01-16 22:31:43 +01:00
rbock
1c4d041b89
Cleaned up some outdated serialize functions
2014-01-15 23:05:24 +01:00
rbock
afcc62fc75
Added interpreters for a bunch of functions and table aliases
2014-01-15 19:42:14 +01:00
rbock
277ce51fb5
Added missing file
2014-01-15 17:44:59 +01:00
rbock
54d45e97ae
Added interpret support for remove()
2014-01-15 08:24:42 +01:00
rbock
54fa55e6a5
interpret works for in()
2014-01-15 07:38:53 +01:00
rbock
602f33726f
interpreter added for update()
2014-01-15 07:22:54 +01:00
rbock
9335a62087
Replaced implicit trivial_value_is_null tag for columns with explicit tvin method
...
This isn't database vendor specific, but library vendor specific, as I
used this implicit behaviour quite a lot, but it is utterly confusing
when mixed with prepared statements. Explicit is better here.
2014-01-14 22:54:07 +01:00
rbock
fa18ce5476
interpret works for insert now
...
Also added explicit .default_values() method
2014-01-13 23:05:48 +01:00
rbock
eb9f92543e
Interpret works for parameters now
...
Also, paramters inherit the operators they need
2014-01-13 21:00:20 +01:00
rbock
c03ef1b0b1
interpret handles order_by(), limit() and offset()
2014-01-13 06:24:27 +01:00
rbock
f21860e5c5
Cleaned up a hack in like()
2014-01-12 16:26:47 +01:00
rbock
7fc5c34190
interpret works for group_by(), having() und .like()
2014-01-12 16:19:09 +01:00
rbock
d56d1422cd
interpret works for where()
2014-01-12 16:01:38 +01:00
rbock
1d3ea8516f
interpreter for from()
2014-01-12 15:45:50 +01:00
rbock
d957e8c0ae
Added interpreter to select, select_flag_list, select_expression_list
2014-01-12 12:22:15 +01:00
rbock
f8b5d750fa
Removed superfluous template parameter from interpreter
...
The Db parameter would actually have prevented different Context
overloads (or made more difficult than necessary).
2014-01-12 10:13:15 +01:00
rbock
47ae6a2e76
Continued to implement standard serializing interpreters
...
Everything that is interpreted also has to move out of detail namespace,
because it might have to be specialized for a database connector
2014-01-11 21:51:57 +01:00
rbock
bef7cea6a6
Started to switch from member serialize -> non-member interpret
...
This will allow database connectors to specialize the interpretation of
the expression tree and interpret queries in vendor specific ways where
required.
2014-01-11 00:11:47 +01:00