- Todo:
- (needs doc..............)
- refer to klflibdbengine.cpp
- is a real, valid sqlite3 database
- table structure:
- klf_dbmetainfo (id INTEGER PRIMARY KEY, name TEXT, value BLOB) stores database-specific information
- created by klf version (name=
klf_version
, value=klf-version)
- database version (name=
klf_dbversion
, value=1
) currently, db version is 1
.
- klf_subresprops (id INTEGER PRIMARY KEY, pid INTEGER, subresource TEXT, pvalue BLOB) stores sub-resource properties
- properties are stored with
pid
= sub-property ID (eg. KLFLibResourceEngine::SubResPropTitle), subresource
= the sub-resource whose given property has this given value, value
= the value of the sub-resource property
- klf_properties (id INTEGER PRIMARY KEY, name TEXT, value BLOB) stores resource properties
- t_subresource_name (id INTEGER PRIMARY KEY, Latex TEXT, DateTime TEXT, Preview BLOB, PreviewSize TEXT, Category TEXT, Tags TEXT, Style BLOB) (possibly more columns as more entry properties are added) stores the entries themselves. Each column stores a KLFLibEntry property.
- Latex is stored as a string
- DateTime is stored as an integer (QDateTime::toTime_t())
- Preview is stored as PNG data (blob)
- Category and Tags are stored as strings
- PreviewSize is stored as a 64-bit integer in the format
(width << 32) | height
- Any other property that is integer type (incl. bool) will be stored as an integer
- Any other property will be stored as
[TypeName]
and (possibly binary) data for that property value. QImage data is stored as PNG (ie. [QImage]png-data
), QString's as [QString]the raw string
as string format, QByteArray's as [QByteArray]the raw data
as a blob, QDateTime's as [QDateTime]integer-epoch
as for the DateTime property, and all other types as [TypeName]
and the binary data resulting from a QDataStream save of the QVariant value (this includes KLFStyle).
Generated by doxygen 1.7.3