File tree Expand file tree Collapse file tree 10 files changed +35
-33
lines changed Expand file tree Collapse file tree 10 files changed +35
-33
lines changed Original file line number Diff line number Diff line change 11import DataRow from "./DataRow" ;
2- import { TYPES } from "./Types" ;
2+ import TYPES from "./Types" ;
33import { randomFromArray } from "../helpers" ;
44
55class InitializeError extends Error { }
@@ -9,7 +9,7 @@ class InitializeError extends Error {}
99 *
1010 * https://docs.snowflake.net/manuals/sql-reference/account-usage/database_storage_usage_history.html
1111 */
12- export class DatabaseStorageUsageHistory extends DataRow {
12+ export default class DatabaseStorageUsageHistory extends DataRow {
1313 constructor ( databaseID , databaseName , date ) {
1414 super ( ) ;
1515 if ( ! this . constructor . _sizes ) {
Original file line number Diff line number Diff line change 11import DataRow from "./DataRow" ;
2- import { TYPES } from "./Types" ;
2+ import TYPES from "./Types" ;
33
44/**
55 * DATABASES View
66 *
77 * https://docs.snowflake.net/manuals/sql-reference/account-usage/databases.html
88 */
9- export class Databases extends DataRow {
9+ export default class Databases extends DataRow {
1010 constructor ( name , id ) {
1111 super ( ) ;
1212 this . DATABASE_NAME = name ;
Original file line number Diff line number Diff line change 11import DataRow from "./DataRow" ;
2- import { TYPES } from "./Types" ;
2+ import TYPES from "./Types" ;
33
44/**
55 * LOAD_HISTORY View
66 *
77 * https://docs.snowflake.net/manuals/sql-reference/account-usage/load_history.html
88 */
9- export class LoadHistory extends DataRow {
9+ export default class LoadHistory extends DataRow {
1010 constructor ( tableID , date ) {
1111 super ( ) ;
1212 this . TABLE_ID = tableID ;
Original file line number Diff line number Diff line change 11import DataRow from "./DataRow" ;
2- import { TYPES } from "./Types" ;
2+ import TYPES from "./Types" ;
33import * as helpers from "../helpers" ;
44
55/**
66 * LOGIN_HISTORY View
77 *
88 * https://docs.snowflake.net/manuals/sql-reference/account-usage/login_history.html
99 */
10- export class LoginHistory extends DataRow {
10+ export default class LoginHistory extends DataRow {
1111 constructor ( date ) {
1212 super ( ) ;
1313 this . EVENT_ID = helpers . getID ( ) ;
Original file line number Diff line number Diff line change 11import uuid4 from "uuid/v4" ;
22
33import DataRow from "./DataRow" ;
4- import { LoginHistory } from "./LoginHistory" ;
5- import { TYPES } from "./Types" ;
4+ import LoginHistory from "./LoginHistory" ;
5+ import TYPES from "./Types" ;
66import * as helpers from "../helpers" ;
77
88/**
99 * QUERY_HISTORY View
1010 *
1111 * https://docs.snowflake.net/manuals/sql-reference/account-usage/query_history.html
1212 */
13- export class QueryHistory extends DataRow {
13+ export default class QueryHistory extends DataRow {
1414 constructor ( databaseName , date ) {
1515 super ( ) ;
1616 this . QUERY_ID = uuid4 ( ) ;
Original file line number Diff line number Diff line change 11import DataRow from "./DataRow" ;
2- import { TYPES } from "./Types" ;
2+ import TYPES from "./Types" ;
33
44/**
55 * STORAGE_USAGE View
66 *
77 * https://docs.snowflake.net/manuals/sql-reference/account-usage/storage_usage.html#storage-usage-view
88 */
9- export class StorageUsage extends DataRow {
9+ export default class StorageUsage extends DataRow {
1010 constructor ( dbStorageUsageHistories , date ) {
1111 super ( ) ;
1212 this . USAGE_DATE = date . toISOString ( ) ;
Original file line number Diff line number Diff line change 11import DataRow from "./DataRow" ;
2- import { TYPES } from "./Types" ;
2+ import TYPES from "./Types" ;
33
4- export class Tables extends DataRow {
4+ export default class Tables extends DataRow {
55 constructor ( id ) {
66 super ( ) ;
77 this . ID = id ;
Original file line number Diff line number Diff line change 1- export const TYPES = {
2- boolean : 'BOOLEAN' ,
3- integer : 'INTEGER' ,
4- string : 'STRING' ,
5- timestamp : 'TIMESTAMP' ,
6- float : 'FLOAT' ,
7- date : 'DATE'
8- }
1+ const TYPES = {
2+ boolean : "BOOLEAN" ,
3+ integer : "INTEGER" ,
4+ string : "STRING" ,
5+ timestamp : "TIMESTAMP" ,
6+ float : "FLOAT" ,
7+ date : "DATE"
8+ } ;
9+
10+ export default TYPES ;
Original file line number Diff line number Diff line change 11import DataRow from "./DataRow" ;
2- import { TYPES } from "./Types" ;
2+ import TYPES from "./Types" ;
33import { randomFromArray } from "../helpers" ;
44
55/**
66 * WAREHOUSE_METERING_HISTORY View
77 *
88 * https://docs.snowflake.net/manuals/sql-reference/account-usage/warehouse_metering_history.html
99 */
10- export class WarehouseMeteringHistory extends DataRow {
10+ export default class WarehouseMeteringHistory extends DataRow {
1111 constructor ( date ) {
1212 super ( ) ;
1313 this . setStartAndEnd ( date ) ;
Original file line number Diff line number Diff line change 1- import { Databases } from "./Databases" ;
2- import { DatabaseStorageUsageHistory } from "./DatabaseStorageUsageHistory" ;
3- import { LoadHistory } from "./LoadHistory" ;
4- import { LoginHistory } from "./LoginHistory" ;
5- import { QueryHistory } from "./QueryHistory" ;
6- import { StorageUsage } from "./StorageUsage" ;
7- import { Tables } from "./Tables" ;
8- import { WarehouseMeteringHistory } from "./WarehouseMeteringHistory" ;
1+ import Databases from "./Databases" ;
2+ import DatabaseStorageUsageHistory from "./DatabaseStorageUsageHistory" ;
3+ import LoadHistory from "./LoadHistory" ;
4+ import LoginHistory from "./LoginHistory" ;
5+ import QueryHistory from "./QueryHistory" ;
6+ import StorageUsage from "./StorageUsage" ;
7+ import Tables from "./Tables" ;
8+ import WarehouseMeteringHistory from "./WarehouseMeteringHistory" ;
99
1010export const TABLE_NAMES = [
1111 "DATABASE_STORAGE_USAGE_HISTORY" ,
You can’t perform that action at this time.
0 commit comments