mirror of
https://github.com/rbock/sqlpp11.git
synced 2026-01-08 14:10:51 -06:00
Added support for dynamic columns to select_expression_list
Dynamic columns are not yet supported in results, though.
This commit is contained in:
@@ -25,9 +25,10 @@
|
||||
|
||||
#include "TabSample.h"
|
||||
#include <sqlpp11/select.h>
|
||||
#include <sqlpp11/connection.h>
|
||||
|
||||
#include <iostream>
|
||||
class DbMock
|
||||
class DbMock: public sqlpp::connection
|
||||
{
|
||||
public:
|
||||
const std::string& escape(const std::string& text) { return text; }
|
||||
@@ -273,6 +274,12 @@ int main()
|
||||
std::cerr << "------------------------\n";
|
||||
}
|
||||
|
||||
// Test that select can be called with zero columns if it is used with dynamic columns.
|
||||
{
|
||||
auto s = dynamic_select(db).dynamic_columns().add_column(t.alpha);
|
||||
s.serialize(std::cerr, db);
|
||||
}
|
||||
|
||||
|
||||
static_assert(sqlpp::is_select_flag_t<decltype(sqlpp::all)>::value, "sqlpp::all has to be a select_flag");
|
||||
using T = sqlpp::detail::wrap_operand<int>::type;
|
||||
|
||||
Reference in New Issue
Block a user