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

32 Commits

Author SHA1 Message Date
rbock
6737bf901d Added a bunch of table tests to select
And some hints regarding additional tests and how to turn them of for
subselects
2014-04-07 22:02:08 +02:00
rbock
bef4d0874b Updates copyright year 2014-03-27 16:43:36 +01:00
rbock
82dc280b1b Added executed select tests 2014-03-18 08:28:17 +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
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
9e8979c6f0 Fixed a bunch of small errors and shorted compile error messages 2014-02-13 08:44:09 +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
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
ec2a8587d4 Added python code generator as an example 2014-01-28 20:53:22 +01:00
rbock
24b44fae65 Re-animated all tests 2014-01-18 20:58:51 +01:00
Roland Bock
a915bd9e50 Refactored of result and result row (clearer structure depending on connectors) 2013-12-17 22:12:13 +01:00
Roland Bock
8d12d23d67 Added verbatim table 2013-11-16 23:19:37 +01:00
Roland Bock
a0af42e57e Added a few more type tests. 2013-11-10 18:03:39 +01:00
Roland Bock
0a57af0b3d Added tests for integral and floating point 2013-11-07 12:23:49 +01:00
Roland Bock
d3963e04b6 Added more checks for database traits 2013-11-01 15:25:52 +01:00
Roland Bock
e63a798a82 Started to use flags to indicate database traits
e.g. support for any or outer join, or how string concatenation is
implemented
2013-11-01 12:23:50 +01:00
Roland Bock
902583a33b Added support for dynamic columns to select_expression_list
Dynamic columns are not yet supported in results, though.
2013-10-09 10:36:38 +02:00
Roland Bock
4d8e448152 Disabled select(tab). Use select(all_of(tab)) instead. 2013-10-03 21:36:50 +02:00
Roland Bock
96c6e5d435 Dynamic methods of select, insert and co return *this now.
Not sure if chaining makes much sense, but it is possible now
2013-10-03 20:53:55 +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
Roland Bock
5604d5d663 Added dynamic limit and offset 2013-09-26 18:54:52 +02:00
Roland Bock
472833016f Added dynamic versions of from and where to select 2013-09-22 20:42:19 +02:00
Roland Bock
5576df1775 Cleaned up select_pseudo_table and started to prepare for dynamic select parts 2013-09-22 12:16:28 +02:00
Roland Bock
0db405c28c Rewrote like() member function, added more type control to concat() 2013-09-19 09:04:07 +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
2defeff18e Introduced field template to make result_row_t less specific.
It is sufficient to have name and type. There is no need for the result
"to know" what exact expression was used to define the column.

Surprisingly, template alias creates new templates (in contrast to
non-template using, which really just creates an alias of a type).

template<typename T> struct A{};

struct X
{
  template<typename T>
    using U = A<T>;
};

struct Y
{
  template<typename T>
    using U = A<T>;
  template<>
    using U<int> = X;
};

template<template<typename> class X>
struct Z{};

static_assert(std::is_same<X::U<int>, Y::U<int>>::value, "class aliases are really just aliases");
static_assert(not std::is_same<Z<X::U>, Z<Y::U>>::value, "template aliases are new templates");

int main()
{
}
2013-09-13 07:24:41 +02:00
Roland Bock
f39582082b Minor cleanup 2013-08-17 11:27:41 +02:00
Roland Bock
712d3a5c53 Renamed examples -> tests
Will need to add reasonable examples
2013-08-17 11:22:38 +02:00