2.2.5.1 Docs Table

The Docs Table stores data for all documents in the SharePoint Store. The Docs Table is defined using T-SQL syntax as follows.

 TABLE Docs(
 Id                             uniqueidentifier  NOT NULL,
 SiteId                         uniqueidentifier  NOT NULL,
 DirName                        nvarchar(256)     NOT NULL,
 LeafName                       nvarchar(128)     NOT NULL,
 WebId                          uniqueidentifier  NOT NULL,
 ListId                         uniqueidentifier  NULL,
 DoclibRowId                    int               NULL,
 Type                           tinyint           NOT NULL,
 Size                           int               NULL,
 MetaInfoSize                   int               NULL,
 Version                        int               NULL,
 UIVersion                      int               NOT NULL DEFAULT 512,
 Dirty                          bit               NULL,
 CacheParseId                   uniqueidentifier  NULL,
 DocFlags                       int               NULL,
 ThicketFlag                    bit               NULL DEFAULT 0,
 CharSet                        int               NULL,
 TimeCreated                    datetime          NOT NULL,
 TimeLastModified               datetime          NOT NULL,
 NextToLastTimeModified         datetime          NULL,
 MetaInfoTimeLastModified       datetime          NULL,
 TimeLastWritten                datetime          NULL,
 SetupPath                      nvarchar(255)     NULL,
 CheckoutUserId                 int               NULL,
 CheckoutDate                   datetime          NULL,
 CheckoutExpires                datetime          NULL,
 CheckoutSize                   int               NULL,
 VersionCreatedSinceSTCheckout  bit               NOT NULL DEFAULT 0,
 LTCheckoutUserId               int               NULL,
 VirusVendorID                  int               NULL,
 VirusStatus                    int               NULL,
 VirusInfo                      nvarchar(255)     NULL,
 MetaInfo                       image             NULL,
 Content                        image             NULL,
 CheckoutContent                image             NULL 
 );

Id: The Document Identifier (section 2.2.1.4) of the document.

SiteId: The Site Collection Identifier (section 2.2.1.17) of the site collection containing the document.

DirName: The directory name of the document location.

LeafName: The leaf name of the document location.

WebId: The Site Identifier (section 2.2.1.19) of the site containing the document.

ListId: The List Identifier (section 2.2.1.10) of the list (1) containing the document, if any, or NULL if the document is not contained in a list.

DoclibRowId: The row identifier for the document within the containing document library or list (1), if applicable.

Type: An integer identifier specifying the document's Document Store Type (section 2.2.2.3).

Size: The size of the document stream, in bytes. This parameter can be set to NULL or to 0 for items such as sites, folders, document libraries, and lists.

MetaInfoSize: The size, in bytes, of the document metadata info.

Version: A counter that is incremented any time a change is made to this document and used for internal conflict detection. This is an internal document version that is separate from the user-visible versioning system reflected in UIVersion.

UIVersion: A UI version number associated with the document. UIVersion defaults to 512, which corresponds to a displayed version of 1.0.

Dirty: Set to 1 if the document requires dependency update processing. Otherwise, it MUST be zero.

CacheParseId: A SharePoint implementation-specific identifier for an internal dependency updates process. Used to manage bulk updates to documents when processed for dependency fix-up.

DocFlags: A Doc Flags (section 2.2.2.2) value specifying information about the document.

ThicketFlag: If set to 1, indicates that the document is an auxiliary thicket file, one of a set of files supporting a thicket.

CharSet: An optional character set associated with the document. The valid values are defined in CharSet Enumeration (section 2.2.1.2). This value can be NULL, indicating that no character set is specified for the document.

TimeCreated: A time stamp in UTC format specifying when this document was created.

TimeLastModified: A time stamp in UTC format. The value specifies when the document was last saved. This corresponds to the actual time when the document was last modified.

NextToLastTimeModified: The value of TimeLastModified from the previous time that the document was saved.

MetaInfoTimeLastModified: A time stamp in UTC format specifying when the metadata information for the document was last changed.

TimeLastWritten: A time stamp in UTC format specifying when any changes were made to the document stream.

SetupPath: Contains the path of the location from where a ghosted document was originally installed. This value MUST be NULL if the document was never ghosted.

CheckoutUserId: If the document is checked out, this parameter contains the User Identifier (section 2.2.1.24) of the user who has the document checked out. Otherwise, this parameter is NULL.

CheckoutDate: A time stamp in UTC format indicating when this document was checked out.

CheckoutExpires: A time stamp in UTC format indicating when the short-term lock for this document will expire.

CheckoutSize: The size of the file when it was checked out.

VersionCreatedSinceSTCheckout: If this parameter is 1, the document version has been incremented since the document last had a short-term lock established. This is used to prevent more than one new version of the document from being created while a short-term lock is established.

LTCheckoutUserId: If the document is currently checked out, this parameter is a calculated column containing the value of CheckoutUserId. Otherwise, this parameter is NULL.

VirusVendorID: The identifier of the virus scanner that processed this document. This value MUST be NULL if this document has not been processed by a virus scanner.

VirusStatus: An enumerated type specifying the current virus checks status of this document. This value MUST be NULL if the document has not been processed by a virus scanner. See Virus Status (section 2.2.1.26) in the Flags section for a list of valid values.

VirusInfo: A string containing a provider-specific message that was returned by the virus scanner when it last processed the document. This value MUST be NULL if the document has not been processed by a virus scanner.

MetaInfo: A metadict for the document. The metadict format is specified in [MS-FPSE] section 2.2.2.2.11. This value MUST be NULL if the document does not exist.

Content: A binary image holding content of the file.

CheckoutContent: A binary image holding the new content of the file, which will be overwritten to the Content field when the file is checked in. This is NULL if the document is not checked out.