Skip to content

Commit d622000

Browse files
Fixed compile error issue related to std::ostream
1 parent eeae3f3 commit d622000

File tree

3 files changed

+224
-149
lines changed

3 files changed

+224
-149
lines changed

sqlite3pp.h

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -52,43 +52,18 @@ SQLITE_EXTENSION_INIT1
5252

5353
namespace sqlite3pp
5454
{
55-
#ifdef SQLITE3PP_NO_UNICODE
56-
typedef std::string tstring;
55+
#if defined(SQLITE3PP_NO_UNICODE) || !defined(_UNICODE)
56+
using tstring = std::string;
5757
#else
58-
std::wstring to_wstring( const char* src );
59-
#ifdef _INC_TCHAR
60-
typedef std::basic_string<TCHAR> tstring;
61-
#else
62-
typedef std::wstring tstring;
63-
#endif //_INC_TCHAR
64-
#endif //SQLITE3PP_NO_UNICODE
58+
using tstring = std::wstring;
59+
#endif // SQLITE3PP_NO_UNICODE || !_UNICODE
6560

6661
#ifndef SQLITE3PP_CONVERT_TO_RESULTING_AFFINITY
6762
// SQLite3 types (Excluding string types)
68-
using Integer = int;
69-
using Int = int;
70-
using Int2 = int;
71-
using Int8 = int;
72-
using Tinyint = unsigned char;
73-
using Smallint = short int;
74-
using Mediumint = int;
75-
using Boolean = bool;
76-
using Bigint = long long int;
77-
using UBigint = unsigned long long int;
78-
using Numeric = double;
79-
using Decimal = double;
80-
using Real = double;
81-
using DoublePrcsn = double;
82-
using Double = double;
83-
using Float = double;
84-
using Blob = std::shared_ptr<std::vector<Tinyint> >;// Stores binary data
63+
using Blob = std::shared_ptr<std::vector<unsigned char> >;// Stores binary data
8564
using Clob = std::shared_ptr< std::vector<char> >; // Stores strings that can have multiple NULL terminators
8665
struct Date {std::time_t t;};
8766
struct Datetime {std::tm tm_struct;};
88-
using Nchar = std::wstring;
89-
using Nvarchar = std::wstring;
90-
using Character = std::string;
91-
using Varchar = std::string;
9267
using TEXT = tstring;
9368
#endif //!SQLITE3PP_CONVERT_TO_RESULTING_AFFINITY
9469

@@ -355,12 +330,12 @@ namespace sqlite3pp
355330
wchar_t const* get(int idx, wchar_t const*) const;
356331
std::wstring get(int idx, const std::wstring&value) const;
357332
#endif// !SQLITE3PP_NO_UNICODE
333+
unsigned char get(int idx, const unsigned char&) const;
334+
short int get(int idx, const short int&) const;
335+
bool get(int idx, const bool&) const;
336+
unsigned long long int get(int idx, const unsigned long long int&) const;
358337
Blob get(int idx, const Blob&) const;
359338
Clob get(int idx, const Clob&) const;
360-
Tinyint get(int idx, const Tinyint&) const;
361-
Smallint get(int idx, const Smallint&) const;
362-
Boolean get(int idx, const Boolean&) const;
363-
UBigint get(int idx, const UBigint&) const;
364339
Date get(int idx, const Date&) const;
365340
Datetime get(int idx, const Datetime&) const;
366341
#endif// !SQLITE3PP_CONVERT_TO_RESULTING_AFFINITY

0 commit comments

Comments
 (0)