Reference

Table Trash


Description

No description available

Supported Operations

Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.
Method Supported Reference EndPoint
SELECT list_deleted_files
INSERT
UPDATE
UPSERT
DELETE empty_trash
LOOKUP

Examples

SSIS

Use Google Drive Connector in API Source component to read data or in API Destination component to read/write data:

Read from Trash table using API Source

API Source - Google Drive
Read and write Google Drive data effortlessly. Integrate, manage, and automate files, folders, and shared drives — almost no coding required.
Google Drive
Trash
Optional Parameters
Search Criteria trashed=true
SSIS API Source - Read from table or endpoint

Read/write to Trash table using API Destination

API Destination - Google Drive
Read and write Google Drive data effortlessly. Integrate, manage, and automate files, folders, and shared drives — almost no coding required.
Google Drive
Trash
Select
Optional Parameters
Search Criteria trashed=true
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

List trash

<p>Returns items in the Trash (deleted files and folders) for the user's drive.</p>

SELECT * FROM Trash

List trash for a shared drive

<p>Returns items in the Trash for a specific shared drive. Supply <code>DriveType='drive'</code> and the shared drive ID.</p>

SELECT * FROM Trash
WITH(DriveType='drive',
     DriveId='1j0HFOP4gsoExxxxxx')

Empty trash

<p>Permanently empties the Trash for the user's drive.</p>

DELETE FROM Trash

Empty trash for a shared drive

<p>Permanently empties the Trash for a specified shared drive. Supply <code>DriveType='drive'</code> and the shared drive ID.</p>

DELETE FROM Trash
WITH(DriveType='drive',
     DriveId='1j0HFOP4gsoExxxxxx')

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

List trash

<p>Returns items in the Trash (deleted files and folders) for the user's drive.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Trash';

EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];

List trash for a shared drive

<p>Returns items in the Trash for a specific shared drive. Supply <code>DriveType='drive'</code> and the shared drive ID.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Trash
WITH(DriveType=''drive'',
     DriveId=''1j0HFOP4gsoExxxxxx'')';

EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];

Empty trash

<p>Permanently empties the Trash for the user's drive.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Trash';

EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];

Empty trash for a shared drive

<p>Permanently empties the Trash for a specified shared drive. Supply <code>DriveType='drive'</code> and the shared drive ID.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Trash
WITH(DriveType=''drive'',
     DriveId=''1j0HFOP4gsoExxxxxx'')';

EXEC (@MyQuery) AT [LS_TO_GOOGLE_DRIVE_IN_GATEWAY];