Thursday, March 31, 2005, 5:53:12 PM, you wrote:
>> The actual test I'm doing is something like:
>> WHERE ?1 >= (base + begin) AND ?1 < (base + end)
>> where ?1, base, begin, and end are all 64-bit addresses.
> This is a test with a well known optimization for unsigned values:
> WHER
> The actual test I'm doing is something like:
> WHERE ?1 >= (base + begin) AND ?1 < (base + end)
> where ?1, base, begin, and end are all 64-bit addresses.
This is a test with a well known optimization for unsigned values:
WHERE (?1 - base - begin) < end
To make the < test unsigned i
How about storing the 64 bit integers as binaries
and write user functions (using sqlite3_create_function ) to do the
computation and comparison?
William Hachfeld wrote:
On Thu, Mar 31, 2005 at 01:52:53PM -0800, Ted Unangst wrote:
Store the length of the region, instead of the end. Or is that
Thanks for the suggestions everyone!
Using Base16, Base64, or even simple decimal-as-text would all be a
possibility. But each requires more than eight bytes of storage. With tens to
hundreds of thousands of addresses being stored, I just don't want to accept
the larger file size. Each of these a
On Thu, Mar 31, 2005 at 01:52:53PM -0800, Ted Unangst wrote:
> Store the length of the region, instead of the end. Or is that impossible?
> I'm not sure what physical property (begin + end) could refer to.
Sorry Ted, the example I gave was misleading. It was meant purely as an
illustration. The a
William Hachfeld wrote:
Heh Everyone,
Have a question regarding storage of 64-bit unsigned values in SQLite... I'm
working on a project where I want to store 64-bit addresses (unsigned values)
as a column in an SQLite database. Currently I create the table using signed
integers. For example:
CREATE
> Before binding an address to a statement using sqlite3_bind_int64() I apply an
> offset to the address to translate it to a signed value. And when reading out
> an address using sqlite3_column_int64() I reverse the process. I.e.
> dbase_value = addr_value - offset
> addr_value = dbase_va
On Thu, 2005-03-31 at 13:59 -0600, William Hachfeld wrote:
> Does anyone have an idea how I can store a 64-bit unsigned integer
> in an SQLite column and still perform useful arithmetic and conditional
> operators on them?
If you can restrict yourself to comparison operations,
then you could sto
William Hachfeld wrote:
On Thu, Mar 31, 2005 at 12:07:22PM -0800, Jay wrote:
I suppose I could convert the unsigned address into a string. But
UINT64_MAX
(2^64 - 1) is:
18,446,744,073,709,551,615
which, without the commas, would require 20 bytes to store. Quite a bit more
than the 8 bytes
On Thu, Mar 31, 2005 at 12:07:22PM -0800, Jay wrote:
> I thought sqlite stored the columns as text internally and converted when
> appropriate. It should therefore be able to handle 64 bit numbers without
> problem.
Not according to the "Datatypes" document for version 3:
http://www.sqlite.o
Heh Everyone,
Have a question regarding storage of 64-bit unsigned values in SQLite... I'm
working on a project where I want to store 64-bit addresses (unsigned values)
as a column in an SQLite database. Currently I create the table using signed
integers. For example:
CREATE TABLE Example (
11 matches
Mail list logo