8000 Support for long and long long missing? · Issue #104 · SqliteModernCpp/sqlite_modern_cpp · GitHub
[go: up one dir, main page]

Skip to content
Support for long and long long missing? #104
Closed
@firesurfer

Description

@firesurfer

Hi,
according to the documentation in your examples this library should support long and long long as types:

// inserts a new user record.
		// binds the fields to '?' .
		// note that only types allowed for bindings are :
		//      int ,long, long long, float, double
		//      string , u16string
		// sqlite3 only supports utf8 and utf16 strings, you should use std::string for utf8 and std::u16string for utf16.
		// note that u"my text" is a utf16 string literal of type char16_t * .
		db << "insert into user (age,name,weight) values (?,?,?);"
			<< 20
			<< u"bob"
			<< 83.25;

But when I'm trying use it with a long value I get this error:

 error: undefined reference to 'sqlite::database_binder& sqlite::operator<< <long>(sqlite::database_binder&, long const&)'

Casting the value to an int before using it in the statement makes it work.
When I took a look at the sqlite_modern_cpp.h file I can't find a fitting function for long values.

So is the documentation wrong or am I just to stupid to use it with a long?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0