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

19 Commits

Author SHA1 Message Date
Roland Bock
705c16e5a3 Rewrote concat function, preparing for concat and operator||, depending on the connector 2013-09-18 15:52:41 +02:00
Roland Bock
c042d99643 Introduced unary function templates which use one pair of braces less
This is required for sqlite which cannot parse

SELECT EXISTS((SELECT 1))
2013-09-18 15:19:47 +02:00
Roland Bock
d55cfce746 Simplified check for duplicate names in select expression list 2013-09-17 07:45:54 +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
9c1e75cd89 Adjusted insert and update to work with sqlite
Introduced first connector trait to change query generation.
2013-09-09 22:45:34 +02:00
Roland Bock
a629988abe Minor code cleanup 2013-09-05 23:57:37 +02:00
Roland Bock
92312445f8 Added convenience include file 2013-09-05 23:56:33 +02:00
Roland Bock
e928b72ede Removed result::size()
The number of rows is unknown in many cases. This might depend on the
configuration.
2013-08-22 08:11:43 +02:00
Roland Bock
09226497a4 Restructured expression types and braces to handle ANY and SOME 2013-08-21 23:25:38 +02:00
Roland Bock
cf1dae396a Fixed handling of IS NULL and IS NOT NULL expressions 2013-08-21 19:32:11 +02:00
Roland Bock
c41a181ca9 Improved early type checking in stand-alone functions 2013-08-21 19:30:56 +02:00
Roland Bock
f244f1110a Added like method for text types 2013-08-21 19:30:13 +02:00
Roland Bock
80e573568e Fixed result to not consume rows with operator* and operator-> 2013-08-17 11:26:58 +02:00
Roland Bock
b7c13e3974 Expand tab -> all_of(tab) in multi_column 2013-08-17 11:25:05 +02:00
Roland Bock
8914e3d18f Fixed decltype to work with g++ 2013-08-17 11:23:54 +02:00
Roland Bock
4ea28cac4b Added support for g++-4.8 2013-08-15 11:54:20 +02:00
Roland Bock
e4bcc27463 is_null() throws for invalid rows
result_row objects can be constructed with raw result rows representing
the end of the result set. Field values must not be accessed for such
rows. Thus, is_null() now throws an exception when called for a field of
an invalid row.
2013-08-15 09:32:24 +02:00
Roland Bock
e6f086bbfa Cleaned up directory structure. 2013-08-14 06:34:11 +02:00