JDBC Driver for Box

Build 23.0.8839

Folders

Create, update, delete, and query the available Folders in Box.

テーブル固有の情報

Select

WHERE 句で条件を指定せずにフォルダを検索すると、デフォルトでルートフォルダから最大5レベルのフォルダのみが返されます。接続文字列でデフォルトの深度値を変更できます。e.g. DirectoryRetrievalDepth=10

SELECT * FROM Folders

エンタープライズ内のすべてのFolders を検索するには、SearhTerms カラムを付けてFolders テーブルをクエリします。

SELECT * FROM Folders WHERE SearchTerms LIKE '%untitled%'

特定のフォルダ内のすべてのFolders を検索するには、ParentId カラムを付けてFolders テーブルをクエリします。

SELECT * FROM Folders WHERE ParentId = '12'

If you're authenticated as an administrator with user impersonation permissions, you can query folders from multiple user accounts:

SELECT * FROM Folders WHERE AsUserId IN (SELECT Id FROM Users)

Note: User impersonation has the following limitations:

  • The authenticated user cannot be impersonated unless that user is a service account.
  • If the authenticated user is a standard user account, they can only query folders associated with their account.
  • Folders shared with multiple users are only returned for one of the users.

Insert

Folder のId および親Folder のId を指定する必要があります。ルートFolder のParentId には、0を使います。

INSERT INTO Folders (Name, ParentId, SharedLink, Description, Access, OwnedById) VALUES ('new folder', '0', 'http://sharedlink.com', 'example desc', 'open', '123')

Update

ReadOnly=False のカラムが更新可能です。

UPDATE Folders SET Description = 'example description', Access = 'open', SharedLink = 'http://sharedlink.com', OwnedById = '321', ParentId = '12', Name = 'no longer new folder'  WHERE Id = '123'

Delete

Folders は、Id を指定してDELETE ステートメントを発行することで削除できます。

DELETE FROM Folders WHERE Id = '123'

Columns

Name Type ReadOnly Description
SearchTerms String True

Query to search the folders database.

Id [KEY] String True

The Id of the folder.

Name String False

The name of the folder.

Etag String True

The Etag of the folder

SequenceId String False

The sequence Id of the folder.

Description String False

The description of the folder.

Access String False

The email access of this folder to.

使用できる値は次のとおりです。open, collaborators

Size Integer True

The size of the file.

CreatedAt Datetime True

The date the file was created at.

ModifiedAt Datetime True

The date the file was modified at.

TrashedAt Datetime True

The date the folder was trashed at.

PurgedAt Datetime True

The date the folder was purged at.

ContentCreatedAt Datetime True

The date the content of the folder was created at.

ContentModifiedAt Datetime True

The date the content of the folder was modified at.

CreatedBy String True

The Id of the user that created the folder.

CreatedByName String True

The Name of the user that created the folder.

CreatedByLogin String True

The Login of the user that created the folder.

SharedLink String False

The Id of the user that created the folder.

ModifiedBy String True

The Id of the user that last modified the folder.

ModifiedByName String True

The Name of the user that last modified the folder.

ModifiedByLogin String True

The Login of the user that last modified the folder.

OwnedById String False

The Id user that owns the folder.

OwnedByName String True

The Name of the user that owns the folder.

OwnedByLogin String True

The Login of the user that owns the folder.

ParentId String False

The Id of the folder that contains the folder.

ItemStatus String True

The status of the folder.

Path String True

The full path of the folder.

AsUserId String False

The Id of the user you want to impersonate. Only works with Admin, Co-Admin and Service Accounts.

Pseudo-Columns

SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるタプルを詳細に制御することができます。

Name Type Description
Scope String

The scope of the search.

ContentTypes String

The content to search the query at, separated by commas. This can contain a mixture of the following: name, file_content, description, comments, tags.

OwnerUserIDs String

The Ids of the owners to limit the search to, separated by a comma.

AncestorfolderIDs String

The Ids of the folders to limit the search to, separated by a comma.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839