Example #1
0
def insert(database: str, table: str, register: list) -> int:
    r = f.insert(database, table, register)
    serializar.commit(f, "GOD")
    return r
Example #2
0
def alterDatabaseDecompress(database: str) -> int:
    r = f.alterDatabaseDecompress(database)
    serializar.commit(f, "GOD")
    return r
Example #3
0
def encrypt(backup: str, password: str) -> str:
    r = f.encrypt(backup, password)
    serializar.commit(f, "GOD")
    return r
Example #4
0
def alterTableAddIndex(database: str, table: str, indexName: str, columns: list) -> int:
    r = f.alterTableAddIndex(database, table, indexName, columns)
    serializar.commit(f, "GOD")
    return r
Example #5
0
def alterDatabaseEncoding(database: str, encoding: str) -> int:
    r = f.alterDatabaseEncoding(database, encoding)
    serializar.commit(f, "GOD")
    return r
Example #6
0
def delete(database: str, table: str, columns: list) -> int:
    r = f.delete(database, table, columns)
    serializar.commit(f, "GOD")
    return r
Example #7
0
def alterTableMode(database: str, table: str, mode: str) -> int:
    r =  f.alterTableMode(database, table, mode)
    serializar.commit(f, "GOD")
    return r
Example #8
0
def dropDatabase(database: str) -> int:
    r = f.dropDatabase(database)
    serializar.commit(f, "GOD")
    return r
Example #9
0
def createTable(database: str, table: str, numberColumns: int) -> int:
    r = f.createTable(database, table, numberColumns)
    serializar.commit(f, "GOD")
    return r
Example #10
0
def graphDF(database: str, table: str) -> str:
    r = f.graphDF(database, table)
    serializar.commit(f, "GOD")
    return r
Example #11
0
def alterDatabase(databaseOld, databaseNew) -> int:
    r = f.alterDatabase(databaseOld, databaseNew)
    serializar.commit(f, "GOD")
    return r
Example #12
0
def graphDSD(database: str) -> str:
    r = f.graphDSD(database)
    serializar.commit(f, "GOD")
    return r
Example #13
0
def safeModeOff(database: str, table: str) -> int:
    r = f.safeModeOff(database, table)
    serializar.commit(f, "GOD")
    return r
Example #14
0
def decrypt(cipherBackup: str, password: str) -> str:
    r = f.decrypt(cipherBackup, password)
    serializar.commit(f, "GOD")
    return r
Example #15
0
def loadCSV(file: str, database: str, table: str) -> list:
    r = f.loadCSV(file, database, table)
    serializar.commit(f, "GOD")
    return r
Example #16
0
def createDatabase(database: str, mode: str, encoding: str) -> int:
    r = f.createDatabase(database, mode, encoding)
    serializar.commit(f, "GOD")
    return r
Example #17
0
def update(database: str, table: str, register: dict, columns: list) -> int:
    r = f.update(database, table, register, columns)
    serializar.commit(f, "GOD")
    return r
Example #18
0
def alterAddPK(database: str, table: str, columns: list) -> int:
    r = f.alterAddPK(database, table, columns)
    serializar.commit(f, "GOD")
    return r
Example #19
0
def truncate(database: str, table: str) -> int:
    r = f.truncate(database, table)
    serializar.commit(f, "GOD")
    return r
Example #20
0
def alterDropPK(database: str, table: str) -> int:
    r = f.alterDropPK(database, table)
    serializar.commit(f, "GOD")
    return r
Example #21
0
def alterTableAddFK(database: str, table: str, indexName: str, columns: list,  tableRef: str, columnsRef: list) -> int:
    r = f.alterTableAddFK(database, table, indexName, columns, tableRef, columnsRef)
    serializar.commit(f, "GOD")
    return r
Example #22
0
def alterTable(database: str, tableOld: str, tableNew: str) -> int:
    r = f.alterTable(database, tableOld, tableNew)
    serializar.commit(f, "GOD")
    return r
Example #23
0
def alterTableDropIndex(database: str, table: str, indexName: str) -> int:
    r = f.alterTableDropIndex(database, table, indexName)
    serializar.commit(f, "GOD")
    return r
Example #24
0
def alterAddColumn(database: str, table: str, default: any) -> int:
    r = f.alterAddColumn(database, table, default)
    serializar.commit(f, "GOD")
    return r
Example #25
0
def checksumTable(database: str, table:str, mode: str) -> str:
    r = f.checksumTable(database, table, mode)
    serializar.commit(f, "GOD")
    return r
Example #26
0
def alterDropColumn(database: str, table: str, columnNumber: int) -> int:
    r = f.alterDropColumn(database, table, columnNumber)
    serializar.commit(f, "GOD")
    return r
Example #27
0
def alterTableCompress(database: str, table: str, level: int) -> int:
    r = f.alterTableCompress(database, table, level)
    serializar.commit(f, "GOD")
    return r
Example #28
0
# File:     storageManager
# License:  Released under MIT License
# Notice:   Copyright (c) 2020 TytusDB Team

from storage import mainMode as r
from storage import Serializable as serializar

f = r.main()

try:
    f = serializar.rollback("GOD")
except:
    serializar.commit(f, "GOD")

#---------------------FUNCIONES DE UNIFICACION DE MODOS DE ALMACENAMIENTO----------------------#

def createDatabase(database: str, mode: str, encoding: str) -> int:
    r = f.createDatabase(database, mode, encoding)
    serializar.commit(f, "GOD")
    return r

# ---------------------FUNCIONES DE ADMINISTRACION DEL MODO DE ALMACENAMIENTO----------------------#

def alterDatabaseMode(database: str, mode: str) -> int:
    r = f.alterDatabaseMode(database, mode)
    serializar.commit(f, "GOD")
    return r

def alterTableMode(database: str, table: str, mode: str) -> int:
    r =  f.alterTableMode(database, table, mode)
    serializar.commit(f, "GOD")