Options
All
  • Public
  • Public/Protected
  • All
Menu

Keyvify Documentation

Index

Type aliases

BetterSQLiteType

BetterSQLiteType: "better-sqlite" | BSQLDatabse

KeyAndNotation

KeyAndNotation: [string, string]

KeyParams

KeyParams: string | KeyAndNotation

MongoDBType

MongoDBType: "mongodb"

Operators

Operators: "+" | "-" | "*" | "/" | "%" | "**" | "add" | "addition" | "sub" | "subtract" | "subtraction" | "multi" | "multiply" | "multiplication" | "div" | "divide" | "diivision" | "mod" | "modulo" | "remind" | "reminder" | "exponent" | "exponential" | "raise" | "power"

SequelizeDialectsType

SequelizeDialectsType: SequelizeDialectsDefTypes | Sequelize

SupportedDialectsType

cc

cc: [string, string]

Variables

Const AddOperators

AddOperators: string[] = ["+", "add", "addition"]

Const DivideOperators

DivideOperators: string[] = ["/", "div" , "divide" , "diivision"]

Const ExpoOperators

ExpoOperators: string[] = ["**", "exponent" , "exponential" , "raise" , "power"]

Const ModOperators

ModOperators: string[] = ["%", "mod" , "modulo" , "remind" , "reminder"]

Const MultiOperators

MultiOperators: string[] = ["*", "multi" , "multiply" , "multiplication"]

Const OperatorsArray

OperatorsArray: string[] = [...AddOperators,...SubOperators,...MultiOperators,...DivideOperators,...ModOperators,...ExpoOperators]

Const SequelizeDialectsStrs

SequelizeDialectsStrs: string[] = ["mysql", "postgres", "sqlite", "mariadb", "mssql"]

Const SubOperators

SubOperators: string[] = ["-", "sub" , "subtract" , "subtraction"]

Const SupportedDialectsStrs

SupportedDialectsStrs: string[] = [...SequelizeDialectsStrs, "mongodb", "better-sqlite"]

Const alphabets

alphabets: string = new Array(26).fill(null).map((n, i) => String.fromCharCode(65 + i)).join("")

Const getKey

getKey: get = ObjectGet

Const moduleName

moduleName: "sequelize" = "sequelize"

Const pullValue

pullValue: pull = ArrayPull

Const setKey

setKey: set = ObjectSet

Const valid

valid: string[] = [...alphabets, ...alphabets.toLowerCase(), ...new Array(10).fill(null).map((n, i) => `${i}`), "_"]

Functions

DefDeserializer

  • DefDeserializer(input: string): any

DefSerializer

  • DefSerializer(input: any): string

checkConfig

  • checkConfig(config: Config, checkDialect?: boolean): void

exportData

  • exportData(database: BaseDB, file: string): Promise<void>

Const getDriver

  • getDriver(): any
  • getDriver(): any
  • getDriver(): any

importData

  • importData(database: BaseDB, file: string, replace?: boolean): Promise<void>

isBaseCacheConstructor

  • isBaseCacheConstructor(cache: any): cache is BaseCacheConstructor

isBaseCacheInstance

  • isBaseCacheInstance(cacheProtos: any): cacheProtos is BaseCache

isBaseDBConstructor

  • isBaseDBConstructor(dialect: any): dialect is BaseDBConstructor

isBaseDBInstance

  • isBaseDBInstance(dialectProtos: any): dialectProtos is BaseDB

isBetterSQLDialect

  • isBetterSQLDialect(dialect: any): dialect is BetterSQLiteType

Const isInstalled

  • isInstalled(): boolean
  • isInstalled(): boolean
  • isInstalled(): boolean

isKeyAndNotation

  • isKeyAndNotation(key: any): key is KeyAndNotation

isMongoDialect

  • isMongoDialect(dialect: any): dialect is MongoDBType

isSequelizeDialect

  • isSequelizeDialect(dialect: any): dialect is SequelizeDialectsType

isSupportedDialect

  • isSupportedDialect(dialect: any): dialect is SupportedDialectsType

isValidLiteral

  • isValidLiteral(str: string, includeDot?: boolean): boolean

isValidMathOperator

  • isValidMathOperator(op: string): op is Operators

mathValue

  • mathValue(val1: number, val2: number, op: string): number

normalize

  • normalize(str: string): string

parseKey

Object literals

Const Constants

Constants: object

ERROR_OPENING_CONNECTION

ERROR_OPENING_CONNECTION: cc = ["Could not open connection", "FAILED_TO_OPEN"] as cc

FILE_DOES_NO_EXIST

FILE_DOES_NO_EXIST: cc = ["Specified file path does not exist", "FILE_DOES_NO_EXIST"] as cc

INVALID_CACHE_OPTION

INVALID_CACHE_OPTION: cc = ["Invalid cache option", "INVALID_CACHE_OPTION"] as cc

INVALID_DATABASE

INVALID_DATABASE: cc = ["Invalid database", "INVALID_DATABASE"] as cc

INVALID_DB_NAME

INVALID_DB_NAME: cc = ["Invalid database name was passed", "INVALID_DB_NAME"] as cc

INVALID_DESERIALIZER

INVALID_DESERIALIZER: cc = ["Invalid deserializer", "INVALID_DESERIALIZER"] as cc

INVALID_DIALECT

INVALID_DIALECT: cc = ["Invalid dialect was passed", "INVALID_DIALECT"] as cc

INVALID_FILE_PATH

INVALID_FILE_PATH: cc = ["Invalid file path was passed", "INVALID_PARAMETERS"] as cc

INVALID_HOST

INVALID_HOST: cc = ["Invalid host", "INVALID_HOST"] as cc

INVALID_KEY

INVALID_KEY: cc = ["Invalid key was passed", "INVALID_KEY"] as cc

INVALID_MATH_OPERATOR

INVALID_MATH_OPERATOR: cc = ["Invalid operator was passed", "INVALID_MATH_OPERATOR"] as cc

INVALID_NUMBER

INVALID_NUMBER: cc = ["Invalid number was passed", "INVALID_NUMBER"] as cc

INVALID_PARAMETERS

INVALID_PARAMETERS: cc = ["Invalid parameters were passed", "INVALID_PARAMETERS"] as cc

INVALID_PASSWORD

INVALID_PASSWORD: cc = ["Invalid password", "INVALID_PASSWORD"] as cc

INVALID_PORT

INVALID_PORT: cc = ["Invalid port", "INVALID_PORT"] as cc

INVALID_REPLACE

INVALID_REPLACE: cc = ["Invalid replace option was passed", "INVALID_REPLACE"] as cc

INVALID_SERIALIZER

INVALID_SERIALIZER: cc = ["Invalid serializer", "INVALID_SERIALIZER"] as cc

INVALID_SQLITE_STORAGE

INVALID_SQLITE_STORAGE: cc = ["Invalid storage path was passed", "INVALID_SQLITE_STORAGE"] as cc

INVALID_SQL_DIALECT

INVALID_SQL_DIALECT: cc = ["Invalid SQL Dialect", "INVALID_SQL_DIALECT"] as cc

INVALID_STORAGE

INVALID_STORAGE: cc = ["Invalid storage", "INVALID_STORAGE"] as cc

INVALID_URI

INVALID_URI: cc = ["Invalid URI", "INVALID_URI"] as cc

INVALID_USERNAME

INVALID_USERNAME: cc = ["Invalid username", "INVALID_USERNAME"] as cc

MISSING_MONGODB_URI

MISSING_MONGODB_URI: cc = ["No Mongoose URI was passed", "MISSING_MONGODB_URI"] as cc

NO_CONFIG

NO_CONFIG: cc = ["No config was passed", "NO_CONFIG"] as cc

NO_DB_NAME

NO_DB_NAME: cc = ["No database name was passed", "NO_DB_NAME"] as cc

NO_DIALECT

NO_DIALECT: cc = ["No dialect was passed", "NO_DIALECT"] as cc

NO_FILE_PATH

NO_FILE_PATH: cc = ["No file path was passed", "INVALID_PARAMETERS"] as cc

NO_KEY

NO_KEY: cc = ["No key was passed", "NO_KEY"] as cc

NO_SQLITE_STORAGE

NO_SQLITE_STORAGE: cc = ["No storage path was passed", "NO_SQLITE_STORAGE"] as cc

NO_VALUE

NO_VALUE: cc = ["No value was passed", "NO_VALUE"] as cc

VALUE_NOT_ARRAY

VALUE_NOT_ARRAY: cc = ["Value is not an array", "VALUE_NOT_ARRAY"] as cc

VALUE_NOT_OBJECT

VALUE_NOT_OBJECT: cc = ["Value is not an object", "VALUE_NOT_OBJECT"] as cc

Const Helpers

Helpers: object

Constants

Constants: { ERROR_OPENING_CONNECTION: cc; FILE_DOES_NO_EXIST: cc; INVALID_CACHE_OPTION: cc; INVALID_DATABASE: cc; INVALID_DB_NAME: cc; INVALID_DESERIALIZER: cc; INVALID_DIALECT: cc; INVALID_FILE_PATH: cc; INVALID_HOST: cc; INVALID_KEY: cc; INVALID_MATH_OPERATOR: cc; INVALID_NUMBER: cc; INVALID_PARAMETERS: cc; INVALID_PASSWORD: cc; INVALID_PORT: cc; INVALID_REPLACE: cc; INVALID_SERIALIZER: cc; INVALID_SQLITE_STORAGE: cc; INVALID_SQL_DIALECT: cc; INVALID_STORAGE: cc; INVALID_URI: cc; INVALID_USERNAME: cc; MISSING_MONGODB_URI: cc; NO_CONFIG: cc; NO_DB_NAME: cc; NO_DIALECT: cc; NO_FILE_PATH: cc; NO_KEY: cc; NO_SQLITE_STORAGE: cc; NO_VALUE: cc; VALUE_NOT_ARRAY: cc; VALUE_NOT_OBJECT: cc }

Type declaration

  • ERROR_OPENING_CONNECTION: cc
  • FILE_DOES_NO_EXIST: cc
  • INVALID_CACHE_OPTION: cc
  • INVALID_DATABASE: cc
  • INVALID_DB_NAME: cc
  • INVALID_DESERIALIZER: cc
  • INVALID_DIALECT: cc
  • INVALID_FILE_PATH: cc
  • INVALID_HOST: cc
  • INVALID_KEY: cc
  • INVALID_MATH_OPERATOR: cc
  • INVALID_NUMBER: cc
  • INVALID_PARAMETERS: cc
  • INVALID_PASSWORD: cc
  • INVALID_PORT: cc
  • INVALID_REPLACE: cc
  • INVALID_SERIALIZER: cc
  • INVALID_SQLITE_STORAGE: cc
  • INVALID_SQL_DIALECT: cc
  • INVALID_STORAGE: cc
  • INVALID_URI: cc
  • INVALID_USERNAME: cc
  • MISSING_MONGODB_URI: cc
  • NO_CONFIG: cc
  • NO_DB_NAME: cc
  • NO_DIALECT: cc
  • NO_FILE_PATH: cc
  • NO_KEY: cc
  • NO_SQLITE_STORAGE: cc
  • NO_VALUE: cc
  • VALUE_NOT_ARRAY: cc
  • VALUE_NOT_OBJECT: cc

Error

Error: Err = Err

Generated using TypeDoc