blob: 16f3c522028ac02c622ab3a221bd87518866372b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// file : mssql/stored-proc/test.hxx
// copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#ifndef TEST_HXX
#define TEST_HXX
#include <string>
#include <odb/core.hxx>
#pragma db view query("SELECT SCHEMA_NAME()")
struct default_schema
{
std::string name;
};
#pragma db object
struct object
{
object () {}
object (unsigned int n, std::string s): num (n), str (s) {}
#pragma db id auto
unsigned long id;
unsigned int num;
std::string str;
};
#pragma db view query("EXEC select_all_objects")
struct select_all_objects
{
unsigned int num;
std::string str;
};
#pragma db view query("EXEC select_objects (?)")
struct select_objects
{
std::string str;
};
#pragma db view query("EXEC objects_min_max_odb (?)")
struct objects_min_max
{
unsigned int num_min;
unsigned int num_max;
};
#pragma db view query("EXEC insert_object_odb (?)")
struct insert_object
{
unsigned int ret;
unsigned long id;
};
#endif // TEST_HXX
|