public DialectDB2(DatabaseMetaData metadata, RepositoryDescriptor repositoryDescriptor) { super(metadata, repositoryDescriptor); fulltextParameters = repositoryDescriptor == null ? null : repositoryDescriptor.getFulltextAnalyzer() == null ? "" : repositoryDescriptor.getFulltextAnalyzer(); usersSeparator = repositoryDescriptor == null ? null : repositoryDescriptor.usersSeparatorKey == null ? DEFAULT_USERS_SEPARATOR : repositoryDescriptor.usersSeparatorKey; fulltextDisabled = true; if (repositoryDescriptor != null) { repositoryDescriptor.setFulltextDisabled(true); } }
public DialectPostgreSQL(DatabaseMetaData metadata, RepositoryDescriptor repositoryDescriptor) { super(metadata, repositoryDescriptor); fulltextAnalyzer = repositoryDescriptor == null ? null : repositoryDescriptor.fulltextAnalyzer == null ? DEFAULT_FULLTEXT_ANALYZER : repositoryDescriptor.fulltextAnalyzer; pathOptimizationsEnabled = repositoryDescriptor == null ? false : repositoryDescriptor.getPathOptimizationsEnabled(); int major, minor; try { major = metadata.getDatabaseMajorVersion(); minor = metadata.getDatabaseMinorVersion(); } catch (SQLException e) { throw new NuxeoException(e); } supportsWith = major > 8 || (major == 8 && minor >= 4); if ((major == 9 && minor >= 1) || (major > 9)) { unloggedKeyword = UNLOGGED_KEYWORD; } else { unloggedKeyword = ""; } usersSeparator = repositoryDescriptor == null ? null : repositoryDescriptor.usersSeparatorKey == null ? DEFAULT_USERS_SEPARATOR : repositoryDescriptor.usersSeparatorKey; String idt = repositoryDescriptor == null ? null : repositoryDescriptor.idType; if (idt == null || "".equals(idt) || "varchar".equalsIgnoreCase(idt)) { idType = DialectIdType.VARCHAR; } else if ("uuid".equalsIgnoreCase(idt)) { idType = DialectIdType.UUID; } else if (idt.toLowerCase().startsWith("sequence")) { idType = DialectIdType.SEQUENCE; if (idt.toLowerCase().startsWith("sequence:")) { String[] split = idt.split(":"); idSequenceName = split[1]; } else { idSequenceName = "hierarchy_seq"; } } else { throw new NuxeoException("Unknown id type: '" + idt + "'"); } try { compatibilityFulltextTable = getCompatibilityFulltextTable(metadata); } catch (SQLException e) { throw new NuxeoException(e); } }
public Dialect(DatabaseMetaData metadata, RepositoryDescriptor repositoryDescriptor) { try { storesUpperCaseIdentifiers = metadata.storesUpperCaseIdentifiers(); } catch (SQLException e) { throw new NuxeoException(e); } if (repositoryDescriptor == null) { fulltextDisabled = true; fulltextSearchDisabled = true; aclOptimizationsEnabled = false; readAclMaxSize = 0; clusteringEnabled = false; softDeleteEnabled = false; proxiesEnabled = true; } else { fulltextDisabled = repositoryDescriptor.getFulltextDisabled(); fulltextSearchDisabled = repositoryDescriptor.getFulltextSearchDisabled(); aclOptimizationsEnabled = repositoryDescriptor.getAclOptimizationsEnabled(); readAclMaxSize = repositoryDescriptor.getReadAclMaxSize(); clusteringEnabled = repositoryDescriptor.getClusteringEnabled(); softDeleteEnabled = repositoryDescriptor.getSoftDeleteEnabled(); proxiesEnabled = repositoryDescriptor.getProxiesEnabled(); } }