Difference between revisions of "Content Table"

From truxwiki.com
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
 
);
 
);
 
</source>
 
</source>
 +
 +
=Columns=
 +
==<code>Hash</code>==
 +
The hash of the contents of the file.
 +
This corresponds to the <code>[HashID]</code> column of the <code><nowiki>[</nowiki>[[File Table|File]]<nowiki>]</nowiki></code> table.
 +
 +
==<code>DepotID</code>==
 +
The globally unique identifier for the depot that hold this content.
 +
This corresponds to the <code>[ID]</code> column of the <code><nowiki>[</nowiki>[[Depot Table|Depot]]<nowiki>]</nowiki></code> table.
 +
 +
==<code>Offset</code>==
 +
The offset into the depot where this content begins.
 +
 +
==<code>Length</code>==
 +
The number of bytes in this content.
 +
 +
==<code>IsContainer</code>==
 +
True if this content blob contains other content blobs contiguously.
 +
 +
==<code>IsResident</code>==
 +
True if this content exists contiguously within another content.

Latest revision as of 08:35, 29 January 2024

The [Content] table holds information about the location of contents.

SQL

CREATE TABLE "Content" (
    "Hash" uuid NOT NULL,
    "DepotID" uuid NOT NULL,
    "Offset" bigint DEFAULT 0 NOT NULL,
    "Length" bigint DEFAULT 0 NOT NULL,
    "IsContainer" boolean DEFAULT false NOT NULL,
    "IsResident" boolean DEFAULT false NOT NULL
);

Columns

Hash

The hash of the contents of the file. This corresponds to the [HashID] column of the [File] table.

DepotID

The globally unique identifier for the depot that hold this content. This corresponds to the [ID] column of the [Depot] table.

Offset

The offset into the depot where this content begins.

Length

The number of bytes in this content.

IsContainer

True if this content blob contains other content blobs contiguously.

IsResident

True if this content exists contiguously within another content.