Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bind Boolean value in Sqlite

Tags:

sqlite

iphone

Anyone have idea about how to bind Boolean in sqlite with objective - c.

i know how to bind int and string but i don't know about boolean value.

sqlite3_bind_int(addStmt, 1, id);
sqlite3_bind_text(addStmt,3 ,[message UTF8String], -1,  SQLITE_TRANSIENT);  

but how can i bind boolean value.

Please help me.

Thanks you

like image 265
milanjansari Avatar asked Jan 26 '26 20:01

milanjansari


1 Answers

SQLite does not distinguish booleans from ints. So you can just use bind_int. The only real storage classes are NULL, INTEGER, REAL, TEXT, and BLOB. Note:

"But as soon as INTEGER values are read off of disk and into memory for processing, they are converted to the most general datatype (8-byte signed integer)."

like image 50
Matthew Flaschen Avatar answered Jan 29 '26 08:01

Matthew Flaschen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!