Sha256: d4fc3e6d66151df82424f0f4c65dc6954f7abd984e19b16e32defbc58ba1a7e2
Contents?: true
Size: 910 Bytes
Versions: 1
Compression:
Stored size: 910 Bytes
Contents
module DmPanlex class Cu include DataMapper::Resource storage_names[:default] = 'cu' #DataMapper requires a primary Key. It's not present in Panlex original database, but we assume it's the :cu_c0_key unique index. In MySQL a 'Text' field can't be a PK, so we change 'loc' and 'vb' to be 'String' property :lv, Integer, :key => true, :required => true, :unique_index => [:cu_c0_key, :cu_c1_key] property :c0, String, :length => 5, :key => true, :required => true, :unique_index => :cu_c0_key property :c1, String, :length => 5, :required => true, :unique_index => :cu_c1_key property :loc, String, :length => 255, :key => true, :unique_index => [:cu_c0_key, :cu_c1_key] property :vb, String, :length => 255, :key => true, :required => true, :unique_index => [:cu_c0_key, :cu_c1_key] belongs_to :lv, :parent_key => :lv, :child_key => :lv end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dm_panlex-0.2.0 | lib/dm_panlex/models/cu.rb |