use result chaining in demo::main.cpp
This commit is contained in:
parent
98af2bc6c4
commit
61a80d93f7
|
|
@ -156,16 +156,19 @@ QUERY_HELPER( temporary_table, id );
|
|||
int main() {
|
||||
using namespace matador::sql;
|
||||
using namespace matador::object;
|
||||
using namespace matador::utils;
|
||||
|
||||
const std::string env_var{"MATADOR_BACKENDS_PATH"};
|
||||
|
||||
std::string dns{"sqlite://demo.db"};
|
||||
schema s( "main" );
|
||||
s.attach<author>( "authors" );
|
||||
s.attach<book>( "books" );
|
||||
auto result = s.attach<author>( "authors" ).and_then( [&s] {
|
||||
return s.attach<book>( "books" );
|
||||
} );
|
||||
// s.attach<book>( "books" );
|
||||
|
||||
connection c( dns );
|
||||
auto result = c.open();
|
||||
result = c.open();
|
||||
// s.create( c );
|
||||
//
|
||||
// auto create_authors_sql = c.query( s )
|
||||
|
|
|
|||
Loading…
Reference in New Issue