
ORDB::Unihan - An ORM for the published Unihan database

version 0.02

use ORDB::Unihan;
# dbh way
my $dbh = ORDB::Unihan->dbh;
my $sql = 'SELECT val FROM unihan WHERE hex = 3402 AND type="RSUnicode"';
my $sth = $dbh->prepare($sql);
# simple way
ORDB::Unihan->selectrow_array($statement);
# or ORLite way
my $vals = ORDB::Unihan::Unihan->select(
'where hex = ?', '3402'
);

TO BE COMPLETED
perldoc ORLite, plus
my $sqlite_path = ORDB::Unihan->sqlite_path();
where the Unihan.sqlite is
CREATE TABLE unihan (
"hex" CHAR(5) NOT NULL,
"type" VARCHAR(18) NOT NULL,
"val" VARCHAR(255),
PRIMARY KEY ("hex", "type")
)
the Unicode scalar value as U+[x]xxxx. 'hex' is [x]xxxx without U+
one of Cangjie, Cantonese, CihaiT, Cowles, Definition, HanYu, IRGHanyuDaZidian, IRGKangXi, IRG_GSource, IRG_JSource, IRG_TSource, Mandarin, Matthews, OtherNumeric, Phonetic, RSAdobe_Japan1_6, RSUnicode, SemanticVariant, Matthews, TotalStrokes
the value for hex and type

Fayland Lam <fayland@gmail.com>

This software is copyright (c) 2010 by Fayland Lam.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.