Get the compatibility name by the db specific type.

@param dbSpecificType the db specific name, as for example DOUBLE;
@return the compat data type;
190860
public String ofDbType( String dbSpecificType ) {
        if (dbSpecificType.equals(TEXT())) {
            return COMPAT_TEXT;
        } else if (dbSpecificType.equals(INTEGER())) {
            return COMPAT_INT;
        } else if (dbSpecificType.equals(LONG())) {
            return COMPAT_LONG;
        } else if (dbSpecificType.equals(REAL())) {
            return COMPAT_REAL;
        } else if (dbSpecificType.equals(BLOB())) {
            return COMPAT_BLOB;
        } else if (dbSpecificType.equals(CLOB())) {
            return COMPAT_CLOB;
        }
        throw new RuntimeException("No type for name: " + dbSpecificType);
    }
592032
private SFSDataType getSFSDataType(MethodCover method) {
	    if(method.isBoolean()) 
	        return SFSDataType.BOOL;
	    if(method.isByte()) 
	        return SFSDataType.BYTE;
	    if(method.isChar())
	        return SFSDataType.BYTE;
	    if(method.isDouble())
	        return SFSDataType.DOUBLE;
	    if(method.isFloat())
	        return SFSDataType.FLOAT;
	    if(method.isInt())
	        return SFSDataType.INT;
	    if(method.isLong())
	        return SFSDataType.LONG;
	    if(method.isShort())
	        return SFSDataType.SHORT;
	    
	    if(method.isString())
	        return SFSDataType.UTF_STRING;
	    
	    if(method.isObject())
	        return SFSDataType.SFS_OBJECT;
	    
	    if(method.isBooleanArray())
	        return SFSDataType.BOOL_ARRAY;
	    if(method.isByteArray())
	        return SFSDataType.BYTE_ARRAY;
	    if(method.isCharArray())
	        return SFSDataType.BYTE_ARRAY;
	    if(method.isDoubleArray())
	        return SFSDataType.DOUBLE_ARRAY;
	    if(method.isFloatArray())
	        return SFSDataType.FLOAT_ARRAY;
	    if(method.isIntArray())
	        return SFSDataType.INT_ARRAY;
	    if(method.isLongArray())
	        return SFSDataType.LONG_ARRAY;
	    if(method.isShortArray())
	        return SFSDataType.SHORT_ARRAY;
	    if(method.isStringArray())
	        return SFSDataType.UTF_STRING_ARRAY;
	    
	    if(method.isObjectArray())
	        return SFSDataType.SFS_ARRAY;
	    
	    if(method.isBooleanCollection())
	        return SFSDataType.BOOL_ARRAY;
	    if(method.isByteCollection())
	        return SFSDataType.BYTE_ARRAY;
	    if(method.isCharCollection())
	        return SFSDataType.BYTE_ARRAY;
	    if(method.isDoubleCollection())
	        return SFSDataType.DOUBLE_ARRAY;
	    if(method.isFloatCollection())
	        return SFSDataType.FLOAT_ARRAY;
	    if(method.isIntCollection())
	        return SFSDataType.INT_ARRAY;
	    if(method.isLongCollection()) 
	        return SFSDataType.LONG_ARRAY;
	    if(method.isShortCollection())
	        return SFSDataType.SHORT_ARRAY;
	    if(method.isStringCollection())
	        return SFSDataType.UTF_STRING_ARRAY;
	    
	    if(method.isObjectCollection())
	        return SFSDataType.SFS_ARRAY;
	    if(method.isArrayObjectCollection())
            return SFSDataType.SFS_ARRAY;
	    return SFSDataType.SFS_ARRAY;
	}
1353774
protected List<String> getCompatibilitySQL() {
        List<String> sqlStatements = new ArrayList<>();
        sqlStatements.add(SELECT_COMPATIBILITY_COINBASE_SQL);
        return sqlStatements;
    }
542975
@Override
	public JavaType getJavaType(final int jdbcType, final String jdbcTypeName) {
		JDBCType type = null;
		try {
			type = JDBCType.valueOf(jdbcType);
		} catch (IllegalArgumentException ex) {
			type = JDBCType.OTHER;
		}
		return getJavaType(type, jdbcTypeName);
	}
70470
public JType getGenericType()
  {
    SignatureAttribute sigAttr = (SignatureAttribute) getAttribute("Signature");

    if (sigAttr != null) {
      return getClassLoader().parseParameterizedType(sigAttr.getSignature());
    }

    return getType();
  }
1224763
public static DatabaseProtocolFrontendEngine newInstance(final DatabaseType databaseType) {
        for (DatabaseProtocolFrontendEngine each : NewInstanceServiceLoader.newServiceInstances(DatabaseProtocolFrontendEngine.class)) {
            if (DatabaseType.valueFrom(each.getDatabaseType()) == databaseType) {
                return each;
            }
        }
        throw new UnsupportedOperationException(String.format("Cannot support database type '%s'", databaseType));
    }
469263
public int getDatabaseType()
    {
        // ****Override this****, If not, try to figure it out
        if (m_vRecordList != null)
            if (this.getRecordlistAt(0) != null)
                return this.getRecordlistAt(0).getDatabaseType() & DBConstants.TABLE_MASK;  // Only type and location
        return super.getDatabaseType(); // LOCAL
    }
528581
public String getDatabasePrefix(int iDatabaseType)
    {
        int iDBType = (iDatabaseType & DBConstants.TABLE_TYPE_MASK);
        String strDbPrefix = null;
        if (iDBType == DBConstants.LOCAL)
            strDbPrefix = this.getProperty(DBParams.LOCAL);
        else if (iDBType == DBConstants.REMOTE)
            strDbPrefix = this.getProperty(DBParams.REMOTE);
        else if (iDBType == DBConstants.TABLE)
            strDbPrefix = this.getProperty(DBParams.TABLE);
        else if (iDBType == DBConstants.MEMORY)
            strDbPrefix = DBParams.MEMORY;
        else if (iDBType == DBConstants.UNSHAREABLE_MEMORY)
            strDbPrefix = DBParams.MEMORY;
        else if (iDBType == DBConstants.SYSTEM_DATABASE)
            strDbPrefix = this.getProperty(DBParams.REMOTE);
        else if (iDBType == DBConstants.REMOTE_MEMORY)
        {
            strDbPrefix = this.getProperty(DBParams.REMOTE);    // Client for remote, memory for concrete db
            if ((strDbPrefix == null) || (this.isConcreteDBClass(strDbPrefix)))
                strDbPrefix = DBParams.MEMORY;
        }
        if ((iDatabaseType & DBConstants.MAPPED) != 0)
            if (this.isConcreteDBClass(strDbPrefix))
                strDbPrefix = "Mapped";
        return strDbPrefix;
    }
813894
def db_type(python_type_representation):
    
    for type_name in _candidate_type_names(python_type_representation):
        db_type_name = _lookup_type_name(type_name)
        if db_type_name:
            return db_type_name
    raise ValueError("Failed to find sqlite3 column type for %s" % (
        python_type_representation))
1103099
public com.google.protobuf.ByteString
      getMaybeTypeNameBytes() {
    java.lang.Object ref = maybeTypeName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      maybeTypeName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
464699
public static String getColumnType(DriverTypeEnum.ConnectionProperties theConnectionProperties, String theTableName, String theColumnName) throws SQLException {
		DataSource dataSource = Objects.requireNonNull(theConnectionProperties.getDataSource());
		try (Connection connection = dataSource.getConnection()) {
			return theConnectionProperties.getTxTemplate().execute(t -> {
				DatabaseMetaData metadata;
				try {
					metadata = connection.getMetaData();
					String catalog = connection.getCatalog();
					String schema = connection.getSchema();
					ResultSet indexes = metadata.getColumns(catalog, schema, massageIdentifier(metadata, theTableName), null);

					while (indexes.next()) {

						String tableName = toUpperCase(indexes.getString("TABLE_NAME"), Locale.US);
						if (!theTableName.equalsIgnoreCase(tableName)) {
							continue;
						}
						String columnName = toUpperCase(indexes.getString("COLUMN_NAME"), Locale.US);
						if (!theColumnName.equalsIgnoreCase(columnName)) {
							continue;
						}

						int dataType = indexes.getInt("DATA_TYPE");
						Long length = indexes.getLong("COLUMN_SIZE");
						switch (dataType) {
							case Types.VARCHAR:
								return BaseTableColumnTypeTask.ColumnTypeEnum.STRING.getDescriptor(length);
							case Types.NUMERIC:
							case Types.BIGINT:
							case Types.DECIMAL:
								return BaseTableColumnTypeTask.ColumnTypeEnum.LONG.getDescriptor(null);
							case Types.INTEGER:
								return BaseTableColumnTypeTask.ColumnTypeEnum.INT.getDescriptor(null);
							case Types.TIMESTAMP:
							case Types.TIMESTAMP_WITH_TIMEZONE:
								return BaseTableColumnTypeTask.ColumnTypeEnum.DATE_TIMESTAMP.getDescriptor(null);
							default:
								throw new IllegalArgumentException("Don't know how to handle datatype " + dataType + " for column " + theColumnName + " on table " + theTableName);
						}

					}

					return null;

				} catch (SQLException e) {
					throw new InternalErrorException(e);
				}

			});
		}
	}
373350
public function getPhpType($dbtype) {
        $phptype = 'string';
        if ($dbtype !== null) {
            foreach ($this->dbtypes as $type => $patterns) {
                foreach ($patterns as $pattern) {
                    if (preg_match($pattern, $dbtype)) {
                        $phptype = $type;
                        break 2;
                    }
                }
            }
        }
        return $phptype;
    }
181732
String getDatabaseName(String dbName) {
        if (mFileNameMap == null) {
            return null;
        }
        String name = mFileNameMap.get(dbName);
        if (name == null && dbName != null) {
            name = mFileNameMap.get(null);
        }
        if (name == null) {
            return null;
        }
        if (mDatabaseHook != null) {
            try {
                dbName = mDatabaseHook.databaseName(dbName);
            } catch (IncompatibleClassChangeError e) {
                // Method not implemented.
            }
        }
        return dbName;
    }
975609
public String getSQLType(boolean bIncludeLength, Map<String, Object> properties) 
    {
        String strType = (String)properties.get(DBSQLTypes.BOOLEAN);
        if (strType == null)
            strType = DBSQLTypes.BYTE;      // The default SQL Type (Byte)
        return strType;
    }
104548
private String getTypeName( Type type ) {
        CheckArg.isNotNull(type, "type");
        if (type.isPrimitiveType()) {
            PrimitiveType primitiveType = (PrimitiveType)type;
            return primitiveType.getPrimitiveTypeCode().toString();
        }
        if (type.isSimpleType()) {
            SimpleType simpleType = (SimpleType)type;
            return JavaMetadataUtil.getName(simpleType.getName());
        }
        if (type.isParameterizedType()) {
            ParameterizedType parameterizedType = (ParameterizedType)type;
            return getTypeName(parameterizedType.getType());
        }
        if (type.isArrayType()) {
            ArrayType arrayType = (ArrayType)type;
            // the element type is never an array type
            Type elementType = arrayType.getElementType();
            if (elementType.isPrimitiveType()) {
                return ((PrimitiveType)elementType).getPrimitiveTypeCode().toString();

            }
            // can't be an array type
            if (elementType.isSimpleType()) {
                return JavaMetadataUtil.getName(((SimpleType)elementType).getName());
            }

        }
        return null;
    }
114054
def dbType(self, typ):
        
        return self.TypeMap.get(typ, self.TypeMap.get('Default'))
1274781
public PDatabase getPDatabase(String strDBName, char charPDatabaseType, boolean bCreateIfNew)
    {
        PDatabase pDB = (PDatabase)m_htDBList.get(charPDatabaseType + ":" + strDBName);
        if (pDB == null)
            if (bCreateIfNew)
        {
            String strClassName = (String)this.getProperty(DBCLASS);
            if (strClassName != null)
            {
                try
                {
                    Class<?> c = Class.forName(strClassName);
                    if (c != null)
                    {
                        pDB = (PDatabase)c.newInstance();
                        if (pDB != null)
                        {
                            pDB.init(this, strDBName, charPDatabaseType);
                            String strPrefix = (String)this.getProperty(PREFIX);
                            String strSuffix = (String)this.getProperty(SUFFIX);
                            if ((strPrefix != null) || (strSuffix != null))
                                pDB.setFilePath(strPrefix, strSuffix);
                        }
                    }
                }
                catch (Exception e) {
                    e.printStackTrace();
                    pDB = null;
                }
            }
        }
        return pDB;
    }