[odb-users] schema generation w sqlite?

MM finjulhich at gmail.com
Fri May 30 12:06:35 EDT 2014


Hello,

I fail to generate a sql file with this command:

odb --std c++11 -d sqlite --generate-query --generate-schema Aodb.h

which returns without error message, on win7/32bit


Aodb.h includes A.h which is the definition of class A, untouched by any
odb.
Aodb.h has:

#ifndef A_ODB_H
#define A_ODB_H

#include <odb/core.hxx>
#include "A.h"  /// class A and struct A_stat defined here

#pragma db object(A)
#pragma db member(A::id_) id auto

#pragma db view(A_stat) object(A)
#pragma db member(A_stat::count)     column("count(" + A::id_ + ")")
#pragma db member(A_stat::min_age) column("min(" + A::age_ + ")")
#pragma db member(A_stat::max_age) column("max(" + A::age_ + ")")

#endif // A_ODB_H

Rds,


More information about the odb-users mailing list