Firefox/Projects/IndexedDB/SQL Schema: Difference between revisions

Tweak object store bits of the schema
(Add index on object_data.key_value)
(Tweak object store bits of the schema)
Line 62: Line 62:
</group>
</group>


</datatypes><table x="66" y="53" name="database">
</datatypes><table x="64" y="52" name="database">
<row name="id" null="1" autoincrement="1">
<row name="id" null="0" autoincrement="1">
<datatype>INTEGER</datatype>
<datatype>INTEGER</datatype>
<default>NULL</default></row>
</row>
<row name="origin" null="0" autoincrement="0">
<row name="origin" null="0" autoincrement="0">
<datatype>MEDIUMTEXT</datatype>
<datatype>MEDIUMTEXT</datatype>
Line 87: Line 87:
<comment>List of databases stored.</comment>
<comment>List of databases stored.</comment>
</table>
</table>
<table x="250" y="125" name="object_store">
<table x="248" y="125" name="object_store">
<row name="id" null="1" autoincrement="1">
<row name="id" null="0" autoincrement="1">
<datatype>INTEGER</datatype>
<datatype>INTEGER</datatype>
<default>NULL</default></row>
</row>
<row name="database_id" null="0" autoincrement="0">
<row name="database_id" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
<datatype>INTEGER</datatype>
<relation table="database" row="id" />
<relation table="database" row="id" />
</row>
<row name="name" null="0" autoincrement="0">
<datatype>MEDIUMTEXT</datatype>
</row>
</row>
<row name="key_path" null="1" autoincrement="0">
<row name="key_path" null="1" autoincrement="0">
Line 100: Line 103:
<key type="PRIMARY" name="">
<key type="PRIMARY" name="">
<part>id</part>
<part>id</part>
<part>database_id</part>
</key>
</key>
<comment>Stores object stores.</comment>
<comment>Stores object stores.</comment>
Line 133: Line 137:
<comment>Stores the indexes for object stores</comment>
<comment>Stores the indexes for object stores</comment>
</table>
</table>
<table x="282" y="281" name="object_data">
<table x="282" y="280" name="object_data">
<row name="id" null="1" autoincrement="1">
<row name="id" null="0" autoincrement="1">
<datatype>INTEGER</datatype>
<datatype>INTEGER</datatype>
<default>NULL</default></row>
</row>
<row name="object_store_id" null="0" autoincrement="0">
<row name="object_store_id" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
<datatype>INTEGER</datatype>
Line 150: Line 154:
<key type="PRIMARY" name="">
<key type="PRIMARY" name="">
<part>id</part>
<part>id</part>
<part>object_store_id</part>
</key>
</key>
<key type="INDEX" name="key_index">
<key type="INDEX" name="key_index">
<part>key_value</part>
<part>key_value</part>
<part>object_store_id</part>
</key>
</key>
<comment>Stores objects for an object store.</comment>
<comment>Stores objects for an object store.</comment>
590

edits