SparkseePython
6.0.2
|
Public Member Functions | |
def | restore_encrypted_backup (self, path, backup_file, config, key_in_hex, iv_in_hex) |
Restores a Database from an encrypted backup file. More... | |
def | resize_in_memory_pool (self, new_capacity) |
Resizes the in memory pool allocator. More... | |
def | create (self, path, alias, config) |
Creates a new Database instance. More... | |
def | verify_checksums (self, path) |
Verifies the Checksum integrity of the given image file and it's recovery log file. More... | |
def | remove_checksums (self, path) |
Converts a database WITH checksums into a database WITHOUT checksums. More... | |
def | restore (self, path, backup_file) |
Restores a Database from a backup file. More... | |
def | add_checksums (self, path) |
Converts a database WITHOUT checksums into a database WITH checksums. More... | |
def | restore_encrypted_backup (self, path, backup_file, key_in_hex, iv_in_hex) |
Restores a Database from an encrypted backup file. More... | |
def | decrypt (self, path) |
Converts a database WITH encryption into a database WITHOUT encryption. More... | |
def | restore (self, path, backup_file, config) |
Restores a Database from a backup file. More... | |
def | create (self, path, alias) |
Creates a new Database instance. More... | |
def | open (self, path, read_only) |
Opens an existing Database instance. More... | |
def | __init__ (self, config) |
Creates a new instance. More... | |
def | open (self, path, read_only, config) |
Opens an existing Database instance. More... | |
def | set_unrecoverable_error_callback (self, callback) |
Sets the unrecoverable error callback. More... | |
def | encrypt (self, path) |
Converts a database WITHOUT encryption into an encrypted database. More... | |
def | close (self) |
Closes the Sparksee instance. More... | |
def | get_in_memory_pool_capacity (self) |
Gets the capacity of the in-memory pool (in Megabytes) More... | |
Static Public Attributes | |
float | VERSION = 5.0 |
Sparksee version. | |
Sparksee class.
All Sparksee programs must have one single Sparksee instance to manage one or more Database instances.
This class allows for the creation of new Databases or open an existing one.
def sparksee.Sparksee.__init__ | ( | self, | |
config | |||
) |
Creates a new instance.
config | [in/out] Sparksee configuration (may be updated). |
def sparksee.Sparksee.add_checksums | ( | self, | |
path | |||
) |
Converts a database WITHOUT checksums into a database WITH checksums.
Any error found is logged. The database (and it's recovery log if present) does NOT have checksums. sparksee::gdb::FileNotFoundExceptionsparksee::gdb::Error
path | The path to the database image file |
RuntimeError | null |
IOError | null |
def sparksee.Sparksee.close | ( | self | ) |
Closes the Sparksee instance.
It must be called to ensure the integrity of all data.
def sparksee.Sparksee.create | ( | self, | |
path, | |||
alias, | |||
config | |||
) |
Creates a new Database instance.
path | [in] Database storage file. |
alias | [in] Database alias name. |
config | [in] Use a specific configuration instead of the one in this Sparksee |
RuntimeError | null |
IOError | If the given file cannot be created. |
Referenced by sparksee.Sparksee.create().
def sparksee.Sparksee.create | ( | self, | |
path, | |||
alias | |||
) |
Creates a new Database instance.
RuntimeError | null |
IOError | If the given file cannot be created. |
References sparksee.Sparksee.create().
def sparksee.Sparksee.decrypt | ( | self, | |
path | |||
) |
Converts a database WITH encryption into a database WITHOUT encryption.
Any error found is logged. The database (and it's recovery log if present) is encrypted. The current encryption had been configured using SparkseeConfig. sparksee::gdb::FileNotFoundExceptionsparksee::gdb::Error
path | The path to the database image file |
RuntimeError | null |
IOError | null |
def sparksee.Sparksee.encrypt | ( | self, | |
path | |||
) |
Converts a database WITHOUT encryption into an encrypted database.
Any error found is logged. The database (and it's recovery log if present) does is NOT encrypted. The encryption had already been configured using SparkseeConfig. sparksee::gdb::FileNotFoundExceptionsparksee::gdb::Error
path | The path to the database image file |
RuntimeError | null |
IOError | null |
def sparksee.Sparksee.get_in_memory_pool_capacity | ( | self | ) |
Gets the capacity of the in-memory pool (in Megabytes)
def sparksee.Sparksee.open | ( | self, | |
path, | |||
read_only | |||
) |
Opens an existing Database instance.
RuntimeError | null |
IOError | If the given file does not exist. |
Referenced by sparksee.Sparksee.open().
def sparksee.Sparksee.open | ( | self, | |
path, | |||
read_only, | |||
config | |||
) |
Opens an existing Database instance.
The provided configuration will be used for all the database settings but not for the license, which must already be properly setup in this class.
path | [in] Database storage file. |
read_only | [in] If TRUE, open Database in read-only mode. |
config | [in] Use a specific configuration instead of the one in this Sparksee |
RuntimeError | null |
IOError | If the given file does not exist. |
References sparksee.Sparksee.open().
def sparksee.Sparksee.remove_checksums | ( | self, | |
path | |||
) |
Converts a database WITH checksums into a database WITHOUT checksums.
Any error found is logged. The database (and it's recovery log if present) have checksums. sparksee::gdb::FileNotFoundExceptionsparksee::gdb::Error
path | The path to the database image file |
RuntimeError | null |
IOError | null |
def sparksee.Sparksee.resize_in_memory_pool | ( | self, | |
new_capacity | |||
) |
Resizes the in memory pool allocator.
new_capacity | The new capacity of the in memory pool allocator |
def sparksee.Sparksee.restore | ( | self, | |
path, | |||
backup_file | |||
) |
Restores a Database from a backup file.
See the Graph class Backup method.
path | [in] Database storage file. |
backup_file | [in] The Backup file to be restored. |
RuntimeError | null |
IOError | If the given file cannot be created, or the exported data file does not exists. |
Referenced by sparksee.Sparksee.restore().
def sparksee.Sparksee.restore | ( | self, | |
path, | |||
backup_file, | |||
config | |||
) |
Restores a Database from a backup file.
See the Graph class Backup method.
path | [in] Database storage file. |
backup_file | [in] The Backup file to be restored. |
config | [in] Use a specific configuration instead of the one in this Sparksee |
RuntimeError | null |
IOError | If the given file cannot be created, or the exported data file does not exists. |
References sparksee.Sparksee.restore().
def sparksee.Sparksee.restore_encrypted_backup | ( | self, | |
path, | |||
backup_file, | |||
config, | |||
key_in_hex, | |||
iv_in_hex | |||
) |
Restores a Database from an encrypted backup file.
See the Graph class EncryptedBackup method.
path | [in] Database storage file. |
backup_file | [in] The Backup file to be restored. |
config | [in] Use a specific configuration instead of the one in this Sparksee |
key_in_hex | [In] The AES encryption Key of the backup file as an hexadecimal string (8, 16 or 32 bytes). |
iv_in_hex | [In] The AES Initialization Vector of the backup file as an hexadecimal string (16 bytes). |
RuntimeError | null |
IOError | If the given file cannot be created, or the exported data file does not exists. |
Referenced by sparksee.Sparksee.restore_encrypted_backup().
def sparksee.Sparksee.restore_encrypted_backup | ( | self, | |
path, | |||
backup_file, | |||
key_in_hex, | |||
iv_in_hex | |||
) |
Restores a Database from an encrypted backup file.
See the Graph class EncryptedBackup method.
path | [in] Database storage file. |
backup_file | [in] The Backup file to be restored. |
key_in_hex | [In] The AES encryption Key of the backup file as an hexadecimal string (8, 16 or 32 bytes). |
iv_in_hex | [In] The AES Initialization Vector of the backup file as an hexadecimal string (16 bytes). |
RuntimeError | null |
IOError | If the given file cannot be created, or the exported data file does not exists. |
References sparksee.Sparksee.restore_encrypted_backup().
def sparksee.Sparksee.set_unrecoverable_error_callback | ( | self, | |
callback | |||
) |
Sets the unrecoverable error callback.
callback | The unrecoverable error callback to set |
def sparksee.Sparksee.verify_checksums | ( | self, | |
path | |||
) |
Verifies the Checksum integrity of the given image file and it's recovery log file.
The main database file checksums are always checked.
When the recovery log file exists, the recovery log file is also checked for checksum and format errors.
When the checksums of the main file or the recovery file are incorrect, the funcion returns false, in any other error it throws an exception.
Any error found is logged as a WARNING.
sparksee::gdb::FileNotFoundExceptionsparksee::gdb::Error
path | The path to the image file |
RuntimeError | null |
IOError | null |