aboutsummaryrefslogtreecommitdiff
path: root/mssql/stored-proc/test.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'mssql/stored-proc/test.hxx')
-rw-r--r--mssql/stored-proc/test.hxx58
1 files changed, 58 insertions, 0 deletions
diff --git a/mssql/stored-proc/test.hxx b/mssql/stored-proc/test.hxx
new file mode 100644
index 0000000..16f3c52
--- /dev/null
+++ b/mssql/stored-proc/test.hxx
@@ -0,0 +1,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