snowflake-sdk
Version:
Node.js driver for Snowflake
59 lines (58 loc) • 2.25 kB
TypeScript
export = SfTimestamp;
/**
* Creates a new SfTimestamp instance.
*
* @param {Number} epochSeconds the epoch time in seconds.
* @param {Number} nanoSeconds the number of nano seconds (incremental, not
* epoch).
* @param {Number} scale the precision for the fractional part of the timestamp.
* @param {String | Number} [timezone] the timezone name as a string
* (e.g. 'America/New_York') or the timezone offset in minutes (e.g. -240).
* @param {String} [format] the SQL format to use to format the timestamp.
* @constructor
*/
declare function SfTimestamp(epochSeconds: number, nanoSeconds: number, scale: number, timezone?: string | number, format?: string): void;
declare class SfTimestamp {
/**
* Creates a new SfTimestamp instance.
*
* @param {Number} epochSeconds the epoch time in seconds.
* @param {Number} nanoSeconds the number of nano seconds (incremental, not
* epoch).
* @param {Number} scale the precision for the fractional part of the timestamp.
* @param {String | Number} [timezone] the timezone name as a string
* (e.g. 'America/New_York') or the timezone offset in minutes (e.g. -240).
* @param {String} [format] the SQL format to use to format the timestamp.
* @constructor
*/
constructor(epochSeconds: number, nanoSeconds: number, scale: number, timezone?: string | number, format?: string);
epochSeconds: number;
nanoSeconds: number;
scale: number;
timezone: string | number | undefined;
format: string;
moment: Moment.Moment;
/**
* Returns a string representing the specified SfTimestamp instance.
*
* @returns {String}
*/
toString(): string;
_valueAsString: string | undefined;
/**
* Converts this SfTimestamp to an SfDate that's just a normal JavaScript Date
* with some additional methods like getEpochSeconds(), getNanoSeconds(),
* getTimezone(), etc.
*
* @returns {Date}
*/
toSfDate(): Date;
/**
* Converts this SfTimestamp to an SfTime, which is just a JavaScript Object
* with some methods: getMidnightSeconds(), getNanoSeconds(), etc.
*
* @returns {Object}
*/
toSfTime(): Object;
}
import Moment = require("moment");