UNPKG

gnablib

Version:

A lean, zero dependency library to provide a useful base for your project.

49 lines (48 loc) 1.77 kB
/*! Copyright 2023-2025 the gnablib contributors MPL-1.1 */ import { ColType } from './ColType.js'; import { ACudColType } from './ACudColType.js'; import type { IValid } from '../interfaces/IValid.js'; import { FromBinResult } from '../../primitive/FromBinResult.js'; import { IProblem } from '../../error/probs/interfaces/IProblem.js'; import { I64 } from '../../primitive/number/I64.js'; declare abstract class AInt extends ACudColType implements IValid<number | I64> { protected abstract get _maxByteLen(): number; protected abstract get _min64(): I64; protected abstract get _max64(): I64; constructor(nullable?: boolean); cudByteSize(): number; valid(input?: number | I64): IProblem | undefined; unknownBin(value?: number | I64): Uint8Array; binUnknown(bin: Uint8Array, pos: number): FromBinResult<I64 | undefined>; } export declare class Int2 extends AInt { readonly _colType = ColType.Int2; readonly _maxByteLen = 8; readonly _min64: I64; readonly _max64: I64; readonly mysqlType = "SMALLINT"; readonly sqliteType = "INT2"; readonly postgresType = "smallint"; readonly cudType = "int2"; } export declare class Int4 extends AInt { readonly _colType = ColType.Int4; readonly _maxByteLen = 8; readonly _min64: I64; readonly _max64: I64; readonly mysqlType = "INT"; readonly sqliteType = "INT"; readonly postgresType = "int"; readonly cudType = "int4"; } export declare class Int8 extends AInt { readonly _colType = ColType.Int8; readonly _maxByteLen = 8; readonly _min64: I64; readonly _max64: I64; readonly mysqlType = "BIGINT"; readonly sqliteType = "INT"; readonly postgresType = "bigint"; readonly cudType = "int8"; } export {};