Difference between revisions of "Free Table"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "These are the tags that can be used in Truxton. <source lang="SQL"> CREATE TABLE "Free" ( "ID" uuid NOT NULL, "MediaID" uuid NOT NULL, "MediaOffset" bigint DEFAUL...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
These are the tags that can be used in Truxton.
+
This table holds information about the unused space on a piece of media.
  
 +
=SQL=
 
<source lang="SQL">
 
<source lang="SQL">
 
CREATE TABLE "Free" (
 
CREATE TABLE "Free" (
Line 13: Line 14:
 
);
 
);
 
</source>
 
</source>
 +
 +
=Columns=
 +
==<code>ID</code>==
 +
The globally unique identifier for this chunk of free space.
 +
 +
==<code>MediaID</code>==
 +
The globally unique identifier of the media from whence this free space chunk came.
 +
This corresponds to the <code>[ID]</code> column of the <code><nowiki>[</nowiki>[[Media Table|Media]]<nowiki>]</nowiki></code> table.
 +
 +
==<code>MediaOffset</code>==
 +
The offset into the media where this free space chunk began.
 +
 +
==<code>DepotID</code>==
 +
The globally unique identifier for the depot where the free space is stored.
 +
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 file where this chunk of free space begins.
 +
 +
==<code>Length</code>==
 +
The number of bytes in this free space chunk.
 +
 +
==<code>EndingOffset</code>==
 +
The last valid depot offset of the data in this block. It should be equal to <code>[Offset]</code> + <code>[Length]</code> - 1.
 +
 +
==<code>FileID</code>==
 +
The globally unique identifier of the file this free space came from.
 +
This happens when disk image files are found in loaded Media.
 +
This corresponds to the <code>[ID]</code> column of the <code><nowiki>[</nowiki>[[File Table|File]]<nowiki>]</nowiki></code> table.

Latest revision as of 07:25, 3 February 2024

This table holds information about the unused space on a piece of media.

SQL

CREATE TABLE "Free" (
    "ID" uuid NOT NULL,
    "MediaID" uuid NOT NULL,
    "MediaOffset" bigint DEFAULT 0 NOT NULL,
    "DepotID" uuid NOT NULL,
    "Offset" bigint DEFAULT 0 NOT NULL,
    "Length" bigint DEFAULT 0 NOT NULL,
    "EndingOffset" bigint DEFAULT 0 NOT NULL,
    "FileID" uuid NOT NULL
);

Columns

ID

The globally unique identifier for this chunk of free space.

MediaID

The globally unique identifier of the media from whence this free space chunk came. This corresponds to the [ID] column of the [Media] table.

MediaOffset

The offset into the media where this free space chunk began.

DepotID

The globally unique identifier for the depot where the free space is stored. This corresponds to the [ID] column of the [Depot] table.

Offset

The offset into the depot file where this chunk of free space begins.

Length

The number of bytes in this free space chunk.

EndingOffset

The last valid depot offset of the data in this block. It should be equal to [Offset] + [Length] - 1.

FileID

The globally unique identifier of the file this free space came from. This happens when disk image files are found in loaded Media. This corresponds to the [ID] column of the [File] table.