ODBC Driver for Box

Build 23.0.8839

Comments

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

テーブル固有の情報

Comments はFile に付けられた追加情報です。これらのComments は子Comments を持つことができます。

Select

Comments テーブルをクエリするには、Id、もしくはFileId を指定します。

SELECT * FROM Comments WHERE Id = '123'

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

SELECT * FROM Comments 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 comments associated with their account.
  • Comments shared with multiple users are only returned for one of the users.

Insert

Comments への挿入には、Comments を挿入するアイテム、およびMessage を指定する必要があります。Message、もしくはTaggedMessage のどちらか片方を指定します。

INSERT INTO Comments (ItemId, ItemType, Message) VALUES ('1', 'file', 'example comment')

Update

Comment のメッセージだけが更新できます。

UPDATE Comments SET Message = 'editor' WHERE Id = '100'

Delete

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

DELETE FROM Comments WHERE Id = '100'

Columns

Name Type ReadOnly Description
Id [KEY] String True

The Id of the comment.

Message String False

The plain message of the comment. Use only this or tagged_message not both.

TaggedMessage String False

The tagged message of the comment. Setting this as @[USER_ID:USERNAME] tags the user and notifies him. A tagged message that does not contain a proper tag will give an error.

ItemId String False

The Id of the item the comment is targeted to.

ItemType String False

The type of the item the comment is targeted to. This can be a file or another comment.

使用できる値は次のとおりです。file, comment

CreatedById String True

The id of the user that created the item.

CreatedByName String True

The name of the user that created the item.

CreatedByLogin String True

The login user that created the item.

CreatedAt Datetime True

The date the item was created.

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
FileID String

The File ID the comment is connected to, is not used to insert to this table.

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