FAQ
Hi Matthias,

2011/10/6 Adam Kennedy <adamkennedybackup@gmail.com>:
Hi Matthias

I may not be the best person to address this question to, as I'm just
the release manager and crotchety old fogie of DBD::SQLite.

The question is best addressed to the DBD::SQLite mailing list.

dbd-sqlite@lists.scsys.co.uk (forwarded)

Adam K
On 5 October 2011 03:33, Matthias Waldorf wrote:
Dear Adam,

sorry if this a stupid question, but I could not?find out how to use a
64-bit INTEGER PRIMARY KEY with a 32-bit version of Perl.

My primary key is a 64-bit number stored as a 16-byte hexadecimal string. Is
there a way to specify an hexadecimal number as INTEGER PRIMARY KEY for an
INSERT, UPDATE or SELECT statement?
INTEGER PRIMARY KEY is something special for sqlite, and you can't insert
anything sqlite doesn't consider an integer. Maybe you might want to
drop "INTEGER"
(or "PRIMARY KEY" if applicable) from your schema, and always treat your keys as
hexadecimal strings (or decimal strings if you convert them to 64bit
integer with the help
of Math::BigInt). You might also want to provide some custom collation
function if you
need finer control (please refer to the DBD::SQLite pod).

Hope this helps,

Kenichi
Thank you very much for your help!

Matthias
_______________________________________________
DBD-SQLite mailing list
DBD-SQLite@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbd-sqlite

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupdbd-sqlite @
postedOct 6, '11 at 4:31a
activeOct 6, '11 at 5:19a
posts2
users2
websiteshadowcat.co.uk

2 users in discussion

Adam Kennedy: 1 post Kenichi ishigaki: 1 post

People

Translate

site design / logo © 2021 Grokbase