Beispiel #1
0
    def get_rdbms_metadata(self, cursor):
        cursor.execute('SELECT version()')
        rs = cursor.fetchone()
        if rs is None:
            result = RDBMSMetadata(VENDOR, PRODUCT, 'unknown')
        else:
            result = RDBMSMetadata(VENDOR, PRODUCT, rs[0])

        return result
Beispiel #2
0
    def get_rdbms_metadata(self, cursor):
        cursor.execute("SELECT banner FROM v$version WHERE "
                       "banner LIKE 'Oracle%'")
        rs = cursor.fetchone()
        if rs is None:
            result = RDBMSMetadata(VENDOR, PRODUCT, 'unknown')
        else:
            result = RDBMSMetadata(VENDOR, PRODUCT, rs[0])

        return result
Beispiel #3
0
    def get_rdbms_metadata(self, cursor):
        product = ''
        version = ''
        vendor = 'Microsoft Corporation'
        cursor.execute('xp_msver')
        rs = cursor.fetchone()
        while rs is not None:
            name = rs[1].lower()
            value = rs[3]
            if name == 'productname':
                product = value

            elif name == 'productversion':
                version = value

            elif name == 'companyname':
                vendor == value

            rs = cursor.fetchone()

        return RDBMSMetadata(vendor, product, version)
Beispiel #4
0
 def get_rdbms_metadata(self, cursor):
     import gadfly
     version = '.'.join([str(i) for i in gadfly.version_info])
     return RDBMSMetadata('gadfly', 'gadfly', version)
Beispiel #5
0
 def get_rdbms_metadata(self, cursor):
     import sqlite3
     return RDBMSMetadata('SQLite', 'SQLite 3', sqlite3.sqlite_version)