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

1488 Commits

Author SHA1 Message Date
Roland Bock
950859af5f Rewrote macro generated function code to handwritten code
This increases the number of Bytes, but it also increases readability,
and reduces complexity.
It also allows to specialize functions for database engines.
2013-09-19 17:07:14 +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
1ab504f908 Fixed compile time checks for concat 2013-09-19 08:15:19 +02:00
Roland Bock
683731517a Introduced result::front, pop_front and empty() to make it more STL-container-like 2013-09-19 08:08:59 +02:00
Roland Bock
8189dc6a00 Fixed bug in type set 2013-09-19 08:04:01 +02:00
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
1596b33e52 Minor cleanup 2013-09-13 10:38:25 +02:00
Roland Bock
853d410593 Added link to sqlite3 connector 2013-09-13 10:37:21 +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
81f1735de8 Reformatted for loops 2013-09-08 12:50:52 +02:00
Roland Bock
dfed59b98f Added credits 2013-09-08 12:50:42 +02:00
Roland Bock
420fa4740c Added link to mysql connector 2013-09-05 23:57:54 +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
7f77a424e3 Minor doc cleanup 2013-08-19 08:10:11 +02:00
Roland Bock
f39582082b Minor cleanup 2013-08-17 11:27:41 +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
e321a2c372 Make CMakeLists work with g++ 2013-08-17 11:25:52 +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
712d3a5c53 Renamed examples -> tests
Will need to add reasonable examples
2013-08-17 11:22:38 +02:00
Roland Bock
e3001df8cd Added cmake support 2013-08-15 13:26:09 +02:00
Roland Bock
4ea28cac4b Added support for g++-4.8 2013-08-15 11:54:20 +02:00
Roland Bock
e95294d044 Some README typos 2013-08-15 09:48:57 +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
7370f098b0 README: Clarified motivation and fixed a bunch of typos 2013-08-15 09:30:57 +02:00
Roland Bock
e6f086bbfa Cleaned up directory structure. 2013-08-14 06:34:11 +02:00
Roland Bock
705f39e379 Initial commit 2013-08-13 22:43:10 +02:00
rbock
7651d5f204 Initial commit 2013-08-13 12:49:34 -07:00