Difference between revisions of "Messages.dat"
(Created page with "Messages.dat is an SQLite database containing messages and some configuration. == Tables == === inbox === Contains Messages that were successfully decrypted. Contains tra...") |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Messages.dat is an [[SQLite]] database containing messages and some configuration. | + | Messages.dat is an [[SQLite]] database containing [[Message|messages]] and some configuration. |
+ | == Location == | ||
+ | Please refer to the [[Keys.dat]] article for the location. | ||
== Tables == | == Tables == | ||
+ | Below is a list of Tables and their creation SQL command. | ||
=== inbox === | === inbox === | ||
Contains Messages that were successfully decrypted. Contains trashed received messages too. | Contains Messages that were successfully decrypted. Contains trashed received messages too. | ||
+ | <pre>CREATE TABLE inbox ( | ||
+ | msgid blob, | ||
+ | toaddress text, | ||
+ | fromaddress text, | ||
+ | subject text, | ||
+ | received text, | ||
+ | message text, | ||
+ | folder text, | ||
+ | encodingtype int, | ||
+ | read bool, | ||
+ | UNIQUE(msgid) ON CONFLICT REPLACE)</pre> | ||
+ | |||
=== sent === | === sent === | ||
Contains Messages that were sent. Contains trashed sent messages too. | Contains Messages that were sent. Contains trashed sent messages too. | ||
+ | <pre>CREATE TABLE sent ( | ||
+ | msgid blob, | ||
+ | toaddress text, | ||
+ | toripe blob, | ||
+ | fromaddress text, | ||
+ | subject text, | ||
+ | message text, | ||
+ | ackdata blob, | ||
+ | lastactiontime integer, | ||
+ | status text, | ||
+ | pubkeyretrynumber integer, | ||
+ | msgretrynumber integer, | ||
+ | folder text, | ||
+ | encodingtype int | ||
+ | )</pre> | ||
+ | |||
=== subscriptions === | === subscriptions === | ||
Contains Addresses the user is subscribed to. | Contains Addresses the user is subscribed to. | ||
+ | <pre>CREATE TABLE subscriptions ( | ||
+ | label text, | ||
+ | address text, | ||
+ | enabled bool | ||
+ | )</pre> | ||
+ | |||
=== addressbook === | === addressbook === | ||
Contains the users address book | Contains the users address book | ||
+ | <pre>CREATE TABLE addressbook ( | ||
+ | label text, | ||
+ | address text | ||
+ | )</pre> | ||
+ | |||
=== blacklist === | === blacklist === | ||
Contains blacklisted addresses | Contains blacklisted addresses | ||
+ | <pre>CREATE TABLE blacklist ( | ||
+ | label text, | ||
+ | address text, | ||
+ | enabled bool | ||
+ | )</pre> | ||
+ | |||
=== whitelist === | === whitelist === | ||
Contains whitelisted addresses | Contains whitelisted addresses | ||
+ | <pre>CREATE TABLE whitelist ( | ||
+ | label text, | ||
+ | address text, | ||
+ | enabled bool | ||
+ | )</pre> | ||
+ | |||
=== inventory === | === inventory === | ||
Contains pubkeys and messages received | Contains pubkeys and messages received | ||
+ | <pre>CREATE TABLE inventory ( | ||
+ | hash blob, | ||
+ | objecttype text, | ||
+ | streamnumber int, | ||
+ | payload blob, | ||
+ | receivedtime integer, | ||
+ | UNIQUE(hash) ON CONFLICT REPLACE)</pre> | ||
+ | |||
=== knownnodes === | === knownnodes === | ||
− | Empty table. Will probably contain known nodes once the system is developed and deployed further. | + | Empty table. Will probably contain known nodes once the system is developed and deployed further. Currently the [[knownnodes.dat]] is used instead. |
+ | <pre>CREATE TABLE knownnodes ( | ||
+ | timelastseen int, | ||
+ | stream int, | ||
+ | services blob, | ||
+ | host blob, | ||
+ | port blob, | ||
+ | UNIQUE(host, stream, port) ON CONFLICT REPLACE)</pre> | ||
+ | |||
=== settings === | === settings === | ||
Contains some settings, currently the version (probably of the database) and the time the database was last cleaned up | Contains some settings, currently the version (probably of the database) and the time the database was last cleaned up | ||
+ | <pre>CREATE TABLE settings ( | ||
+ | key blob, | ||
+ | value blob, | ||
+ | UNIQUE(key) ON CONFLICT REPLACE)</pre> | ||
+ | |||
=== pubkeys === | === pubkeys === | ||
Contains public keys created by the user and the time it was last transmitted. | Contains public keys created by the user and the time it was last transmitted. | ||
+ | <pre>CREATE TABLE pubkeys ( | ||
+ | hash blob, | ||
+ | transmitdata blob, | ||
+ | time int, | ||
+ | usedpersonally text, | ||
+ | UNIQUE(hash) ON CONFLICT REPLACE)</pre> | ||
== Deleted messages == | == Deleted messages == | ||
Internally a message is deleted by setting its folder to "trash" but leaving it in its table. | Internally a message is deleted by setting its folder to "trash" but leaving it in its table. | ||
The current version has an option to delete trashed messages definitely, this also shrinks the database. Allows the user to clean up the database more than once per month. | The current version has an option to delete trashed messages definitely, this also shrinks the database. Allows the user to clean up the database more than once per month. | ||
+ | |||
+ | |||
+ | [[Category:DAT Files]] |
Latest revision as of 08:08, 28 August 2013
Messages.dat is an SQLite database containing messages and some configuration.
Contents
Location
Please refer to the Keys.dat article for the location.
Tables
Below is a list of Tables and their creation SQL command.
inbox
Contains Messages that were successfully decrypted. Contains trashed received messages too.
CREATE TABLE inbox ( msgid blob, toaddress text, fromaddress text, subject text, received text, message text, folder text, encodingtype int, read bool, UNIQUE(msgid) ON CONFLICT REPLACE)
sent
Contains Messages that were sent. Contains trashed sent messages too.
CREATE TABLE sent ( msgid blob, toaddress text, toripe blob, fromaddress text, subject text, message text, ackdata blob, lastactiontime integer, status text, pubkeyretrynumber integer, msgretrynumber integer, folder text, encodingtype int )
subscriptions
Contains Addresses the user is subscribed to.
CREATE TABLE subscriptions ( label text, address text, enabled bool )
addressbook
Contains the users address book
CREATE TABLE addressbook ( label text, address text )
blacklist
Contains blacklisted addresses
CREATE TABLE blacklist ( label text, address text, enabled bool )
whitelist
Contains whitelisted addresses
CREATE TABLE whitelist ( label text, address text, enabled bool )
inventory
Contains pubkeys and messages received
CREATE TABLE inventory ( hash blob, objecttype text, streamnumber int, payload blob, receivedtime integer, UNIQUE(hash) ON CONFLICT REPLACE)
knownnodes
Empty table. Will probably contain known nodes once the system is developed and deployed further. Currently the knownnodes.dat is used instead.
CREATE TABLE knownnodes ( timelastseen int, stream int, services blob, host blob, port blob, UNIQUE(host, stream, port) ON CONFLICT REPLACE)
settings
Contains some settings, currently the version (probably of the database) and the time the database was last cleaned up
CREATE TABLE settings ( key blob, value blob, UNIQUE(key) ON CONFLICT REPLACE)
pubkeys
Contains public keys created by the user and the time it was last transmitted.
CREATE TABLE pubkeys ( hash blob, transmitdata blob, time int, usedpersonally text, UNIQUE(hash) ON CONFLICT REPLACE)
Deleted messages
Internally a message is deleted by setting its folder to "trash" but leaving it in its table. The current version has an option to delete trashed messages definitely, this also shrinks the database. Allows the user to clean up the database more than once per month.