Comments (6)
Hi,
What result line should be?
using _traits = sqlpp::make_traits<sqlpp::integer, sqlpp::tag::require_insert>;
or
using _traits = sqlpp::make_traits<sqlpp::integer, sqlpp::tag::can_be_null>;
or both
using _traits = sqlpp::make_traits<sqlpp::integer, sqlpp::tag::can_be_null, sqlpp::tag::require_insert>;
?
My current generator gives 2nd line.
from sqlpp11.
using _traits = sqlpp::make_traits<sqlpp::integer, sqlpp::tag::can_be_null>;
This is correct (result of the linked commit, b92a9a7). I was wondering if there are versions of sqlite3 that return a string for the notnull
column (that was the previous behavior). If unclear, then we should keep it this way.
from sqlpp11.
What can return column[3] == 0
here?
sqlCanBeNull = column[3] == 0 or column[3] == '0'
from sqlpp11.
The old code used column[3] == '0'
. That did not work correctly on my machine since column[3]
a numeric value.
That's why the new code uses column[3] == 0
in addition.
My question is: Are there versions of sqlite3 that yield a string in column[3]
?
from sqlpp11.
I had always "0"
in my code.
https://github.com/egorpugin/primitives/blob/master/src/tools/sqlpp11.sqlite2cpp.cpp#L222
Sqlite returns char *
value 0
or 1
, so I compare it with "0";
from sqlpp11.
Interesting. In python the result is numeric. At least on my machine.
Thanks for looking into it. I'll leave as is.
from sqlpp11.
Related Issues (20)
- Is there any opentracing support in sqlpp,like jaeger?Will it be supported in the future? HOT 1
- how to fix update exception? HOT 23
- How to retrieve the row count of a query result? HOT 6
- mysql does not seem to support the TIME type HOT 4
- Multiple table query error HOT 3
- Mysql prepared_statement.h missing _bind_time_of_day_parameter function HOT 3
- How do I get record with count of references from one to many? HOT 4
- Handling of `::sqlpp::tag::enforce_null_result_treatment` does not seem to be implemented, NULL documentation is erroneous HOT 11
- [Feedback Requested] Results returning optional, string_view, and span HOT 22
- [requesting assistance] Can the same parameter be used in multiple places in the same prepared statement? HOT 13
- [Need assistance] Common Table Expressions with update HOT 2
- Can't find how to use count(1) HOT 3
- head file include question HOT 3
- how to predict const struct sqlpp::result_row_t is or not NULL? HOT 3
- Supporting the BETWEEN operator? HOT 2
- SQLite: Is order by rowid possible? HOT 2
- Title: Error E0140: Too Many Arguments in Function Call in `for_update.h` with VS2022 HOT 3
- Using sqlpp::parameterized_verbatim as lhs in comparison results in segfault. HOT 4
- [Bug] [SQLite] White space at the end of the SQL string makes execute() throw "Sqlite3 connector: Cannot execute multi-statements" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlpp11.