/sqlite3cc

To get this branch, use:
bzr branch http://bzr.ed.am/sqlite3cc

« back to all changes in this revision

Viewing changes to include/sqlite3cc/manipulator.h

  • Committer: Tim Marston
  • Date: 2015-02-26 08:56:26 UTC
  • Revision ID: tim@ed.am-20150226085626-vba9c55uz3ta094h
improved support for blobs: added bind_blob(), added blob_t for binding stream
operators and blob() creation function; detect blob column type in row::column()

Show diffs side-by-side

added added

removed removed

24
24
#define SQLITE3CC_MANIPULATOR_H_
25
25
 
26
26
 
 
27
#include <string>
 
28
 
 
29
 
27
30
namespace sqlite
28
31
{
29
32
 
34
37
        struct null_t { };
35
38
        struct exec_t { };
36
39
        struct set_index_t { unsigned int _index; };
 
40
        struct blob_t { const char *value; unsigned int value_length; };
37
41
}
38
42
 
39
43
 
64
68
detail::set_index_t set_index(
65
69
        unsigned int index );
66
70
 
 
71
/**
 
72
 * Stream manipulator.  When used with a statement's or a row's stream operator,
 
73
 * this indicates that the data contained within is to be bound as a blob,
 
74
 * rather than text.
 
75
 *
 
76
 * @param value the blob data value
 
77
 * @param value_length the length of the blob data
 
78
 */
 
79
detail::blob_t blob(
 
80
        const char *value,
 
81
        unsigned int value_length );
 
82
 
 
83
/**
 
84
 * Stream manipulator.  When used with a statement's or a row's stream operator,
 
85
 * this indicates that the data contained within is to be bound as a blob,
 
86
 * rather than text.
 
87
 *
 
88
 * @param value the blob data value
 
89
 */
 
90
detail::blob_t blob(
 
91
        const std::string &value );
 
92
 
67
93
 
68
94
} // namespace sqlite
69
95