def getColumnIsUnique(self, col): """ Returns 1 if the specified column is unique and 0 otherwise. """ return CSQLRelay.getColumnIsUnique(self.cursor, col)
def errorMessage(self): """ If the operation failed, the error message will be returned from this method. Otherwise, it returns None. """ return CSQLRelay.connectionErrorMessage(self.connection)
def getDebug(self): """ Returns 1 if debugging is turned on and 0 if debugging is turned off. """ return CSQLRelay.getDebug(self.connection)
def autoCommitOn(self): """ Instructs the database to perform a commit after every successful query. """ return CSQLRelay.autoCommitOn(self.connection)
def commit(self): """ Issues a commit, returns true if the commit succeeded, false if it failed. """ return CSQLRelay.commit(self.connection)
def bindFormat(self): """ Returns a string representing the format of the bind variables used in the db. """ return CSQLRelay.bindFormat(self.connection)
def getCurrentDatabase(self): """ Returns the database/schema that is currently in use. """ return CSQLRelay.getCurrentDatabase(self.connection)
def getLongest(self, col): """ Returns the length of the specified column. col may be a name or number. """ return CSQLRelay.getLongest(self.cursor, col)
def enableTls(self, version, cert, password, ciphers, validate, ca, depth): """ Enables TLS/SSL encryption, and optionally authentication. "version" specifies the TLS/SSL protocol version that the client will attempt to use. Valid values include SSL2, SSL3, TLS1, TLS1.1, TLS1.2 or any more recent version of TLS, as supported by and enabled in the underlying TLS/SSL library. If left blank or empty then the highest supported version will be negotiated. "cert" is the file name of the certificate chain file to send to the SQL Relay server. This is only necessary if the SQL Relay server is configured to authenticate and authorize clients by certificate. If "cert" contains a password-protected private key, then "password" may be supplied to access it. If the private key is not password-protected, then this argument is ignored, and may be left empty or NULL. "ciphers" is a list of ciphers to allow. Ciphers may be separated by spaces, commas, or colons. If "ciphers" is empty or NULL then a default set is used. Only set this if you know that you have a good reason to. For a list of valid ciphers on Linux/Unix platforms, see: man ciphers For a list of valid ciphers on Windows platforms, see: https://msdn.microsoft.com/en-us/library/windows/desktop/aa375549%28v=vs.85%29.aspx On Windows platforms, the ciphers (alg_id's) should omit CALG_ and may be given with underscores or dashes. For example: 3DES_112 "validate" indicates whether to validate the SQL Relay's server certificate, and may be set to one of the following: "no" - Don't validate the server's certificate. "ca" - Validate that the server's certificate was signed by a trusted certificate authority. "ca+host" - Perform "ca" validation and also validate that one of the subject altenate names (or the common name if no SANs are present) in the certificate matches the host parameter. (Falls back to "ca" validation when a unix socket is used.) "ca+domain" - Perform "ca" validation and also validate that the domain name of one of the subject alternate names (or the common name if no SANs are present) in the certificate matches the domain name of the host parameter. (Falls back to "ca" validation when a unix socket is used.) "ca" is the location of a certificate authority file to use, in addition to the system's root certificates, when validating the SQL Relay server's certificate. This is useful if the SQL Relay server's certificate is self-signed. On Windows, "ca" must be a file name. On non-Windows systems, "ca" can be either a file or directory name. If it is a directory name, then all certificate authority files found in that directory will be used. If it a file name, then only that file will be used. Note that the supported "cert" and "ca" file formats may vary between platforms. A variety of file formats are generally supported on Linux/Unix platfoms (.pem, .pfx, etc.) but only the .pfx format is currently supported on Windows. */ """ return CSQLRelay.enableTls(self.connection, version, cert, password, ciphers, validate, ca, depth)
def getColumnIsBinary(self, col): """ Returns 1 if the specified column contains binary data and 0 otherwise. """ return CSQLRelay.getColumnIsBinary(self.cursor, col)
def getColumnIsAutoIncrement(self, col): """ Returns 1 if the specified column auto-increments and 0 otherwise. """ return CSQLRelay.getColumnIsAutoIncrement(self.cursor, col)
def getColumnIsZeroFilled(self, col): """ Returns 1 if the specified column was created with the zero-fill flag and 0 otherwise. """ return CSQLRelay.getColumnIsZeroFilled(self.cursor, col)
def getColumnIsUnsigned(self, col): """ Returns 1 if the specified column is an unsigned number and 0 otherwise. """ return CSQLRelay.getColumnIsUnsigned(self.cursor, col)
def getColumnIsPartOfKey(self, col): """ Returns 1 if the specified column is part of a composite key and 0 otherwise. """ return CSQLRelay.getColumnIsPartOfKey(self.cursor, col)
def serverVersion(self): """ Returns the version of the SQL Relay server version """ return CSQLRelay.serverVersion(self.connection)
def disableEncryption(self): """ Disables encryption. """ return CSQLRelay.disableEncryption(self.connection)
def clientVersion(self): """ Returns the version of the SQL Relay client version """ return CSQLRelay.clientVersion(self.connection)
def endSession(self): """ Ends the current session. """ return CSQLRelay.endSession(self.connection)
def selectDatabase(self, database): """ Sets the current database/schema to "database" """ return CSQLRelay.selectDatabase(self.connection, database)
def ping(self): """ Returns 1 if the database is up and 0 if it's down. """ return CSQLRelay.ping(self.connection)
def getLastInsertId(self): """ Returns the value of the autoincrement column for the last insert """ return CSQLRelay.getLastInsertId(self.connection)
def identify(self): """ Returns the type of database: oracle, postgresql, mysql, etc. """ return CSQLRelay.identify(self.connection)
def autoCommitOff(self): """ Instructs the database to wait for the client to tell it when to commit. """ return CSQLRelay.autoCommitOff(self.connection)
def dbVersion(self): """ Returns the version of the database """ return CSQLRelay.dbVersion(self.connection)
def rollback(self): """ Issues a rollback, returns true if the rollback succeeded, false if it failed. """ return CSQLRelay.rollback(self.connection)
def dbHostName(self): """ Returns the host name of the database """ return CSQLRelay.dbHostName(self.connection)
def debugOff(self): """ Turn verbose debugging off. """ return CSQLRelay.debugOff(self.connection)
def dbIpAddress(self): """ Returns the ip address of the database """ return CSQLRelay.dbIpAddress(self.connection)
def getClientInfo(self): """ Returns the string that was set by setClientInfo(). """ return CSQLRelay.getClientInfo(self.connection)
def getColumnIsPrimaryKey(self, col): """ Returns 1 if the specified column is a primary key and 0 otherwise. """ return CSQLRelay.getColumnIsPrimaryKey(self.cursor, col)