Base class of a connection

A base class for the connection types of QDB, either Connection or PartialConnection. Both classes extend from this base and are both subject to a standard method and some properties which are listed below.

To create your own connection class, extend the base and add a constructor.

const {BaseConnection} = require("qdatabase");
class MyConnection extends BaseConnection {
	constructor (Path) {
		this.Path = Path;

Or on the other hand, you could also extend from the Connection class and add your own data management functions to further interact with QDB.



Always a nill value when using this class, unless in a connection.
Type - Null


The current state of this connection. When using this class, it will always be 'BASE' unless you're in a (partial) connection.
Type - String


A Cache Collection which is free to use within this connection.
Type - Cache



Reconnects to a different file and state under this class instance.

Parameter Type Description
PathURL String The URL to the new database file.

Returns - Connection | This
Returns the new connection or the same class if the path is invalid.