title: Binding an 'unsigned long' (uint64) in an sqlite3 statement? C++
body: <p>I'm using the sqlite3 library that is available at <a href="http://www.sqlite.org/download.html" rel="noreferrer">sqlite.org</a>.</p>
  
  <p>I have some unsigned longs that I would like store in a database. I do not want to construct the query myself and leave it open to some sort of injection (whether it be accidental or not). Thus, I'm using the <a href="http://www.sqlite.org/c3ref/bind_blob.html" rel="noreferrer"><code>sqlite_bind_*</code></a> functions to 'sanitize' my parameters. </p>
  
  <p>The issue is that there isn't a function type for unsigned long integers, just integers. </p>
  
  <p><code>int sqlite3_bind_int(sqlite3_stmt*, int, int);</code></p>
  
  <p><code>int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);</code></p>
  
  <p>I am definitely going to have numbers that will overflow if I am unable to store them in an unsigned manner.</p>
  
  <p>Am I going to need to manage this myself? (i.e. casting to an unsigned type after selecting from the db or casting to signed type before inserting into database)</p>
  
  <p>If I do have to manage this myself, how would one do some comparison queries that are stored as a signed long integer when the comparisons are really meant to be in the unsigned range?</p>
  
  <p>Looking at the <a href="http://www.sqlite.org/datatype3.html" rel="noreferrer">INTEGER datatypes</a> that get converted, one would think that unsigned longs could be represented without issue.</p>
  
  <p>If there are other solutions available, please enlighten me! 
  Thanks!</p>