-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconstant.go
24 lines (20 loc) · 1.15 KB
/
constant.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package bqwt
const (
TableInfoStandardSQL = "SELECT table_schema AS datasetId, table_name As tableId, UNIX_MILLIS(creation_time) AS created, UNIX_MILLIS(storage_last_modified_time) AS lastModified " +
"FROM `%s.INFORMATION_SCHEMA.TABLE_STORAGE` " +
"WHERE UNIX_MILLIS(storage_last_modified_time) > %v " +
"AND table_schema = '%s' " +
"ORDER BY storage_last_modified_time DESC"
LastModifiedTableStandardSQL = "SELECT table_schema AS datasetId, table_name As tableId, UNIX_MILLIS(creation_time) AS created, UNIX_MILLIS(storage_last_modified_time) AS lastModified " +
"FROM `%s.INFORMATION_SCHEMA.TABLE_STORAGE` " +
"WHERE table_schema = '%s' " +
"ORDER BY storage_last_modified_time DESC LIMIT 1"
TableInfoLegacySQL = `SELECT dataset_id AS datasetId, table_id As tableId, creation_time AS created, last_modified_time AS lastModified
FROM [%s.__TABLES__]
WHERE last_modified_time > %v
ORDER BY last_modified_time DESC`
LastModifiedTableLegacySQL = `SELECT dataset_id AS datasetId, table_id As tableId, creation_time AS created, last_modified_time AS lastModified
FROM [%s.__TABLES__]
ORDER BY last_modified_time DESC
LIMIT 1`
)