Get or create a Tile Matrix Set DAO

@return tile matrix set dao
@throws SQLException
upon dao creation failure
979210
private TileMatrixSetDao getTileMatrixSetDao() throws SQLException {
		if (tileMatrixSetDao == null) {
			tileMatrixSetDao = DaoManager.createDao(connectionSource,
					TileMatrixSet.class);
		}
		return tileMatrixSetDao;
	}
415357
public List<SqlResultSetMapping<OrmDescriptor>> getAllSqlResultSetMapping()
   {
      List<SqlResultSetMapping<OrmDescriptor>> list = new ArrayList<SqlResultSetMapping<OrmDescriptor>>();
      List<Node> nodeList = model.get("sql-result-set-mapping");
      for(Node node: nodeList)
      {
         SqlResultSetMapping<OrmDescriptor>  type = new SqlResultSetMappingImpl<OrmDescriptor>(this, "sql-result-set-mapping", model, node);
         list.add(type);
      }
      return list;
   }
480194
public static StmtRunner get()
    {
        if (StmtRunner.RUNNER == null) {
            StmtRunner.RUNNER = new StmtRunner();
            EQLRUNNERS.add(SQLRunner.class);
        }
        return StmtRunner.RUNNER;
    }
27600
private DataColumnsDao getDataColumnsDao() {
        DataColumnsDao dataColumnsDao = null;
        try {
            dataColumnsDao = DaoManager.createDao(featureDao.getDb().getConnectionSource(), DataColumns.class);
            if (!dataColumnsDao.isTableExists()) {
                dataColumnsDao = null;
            }
        } catch (SQLException e) {
            dataColumnsDao = null;
            Log.e(FeatureOverlayQuery.class.getSimpleName(), "Failed to get a Data Columns DAO", e);
        }
        return dataColumnsDao;
    }
1257255
public <T> int createWithForeignDao(T foreignData) throws SQLException {
		@SuppressWarnings("unchecked")
		Dao<T, ?> castDao = (Dao<T, ?>) foreignDao;
		return castDao.create(foreignData);
	}
479471
public void initialize() throws SQLException {
		if (!Boolean.parseBoolean(System.getProperty(AUTO_CREATE_TABLES))) {
			return;
		}

		if (configuredDaos == null) {
			throw new SQLException("configuredDaos was not set in " + getClass().getSimpleName());
		}

		// find all of the daos and create the tables
		for (Dao<?, ?> dao : configuredDaos) {
			Class<?> clazz = dao.getDataClass();
			try {
				DatabaseTableConfig<?> tableConfig = null;
				if (dao instanceof BaseDaoImpl) {
					tableConfig = ((BaseDaoImpl<?, ?>) dao).getTableConfig();
				}
				if (tableConfig == null) {
					tableConfig = DatabaseTableConfig.fromClass(connectionSource.getDatabaseType(), clazz);
				}
				TableUtils.createTable(connectionSource, tableConfig);
				createdClasses.add(tableConfig);
			} catch (Exception e) {
				// we don't stop because the table might already exist
				System.err.println("Was unable to auto-create table for " + clazz);
				e.printStackTrace();
			}
		}
	}
19580
public function getSQLAdapter() {
		return $this->sqlAdapter ? $this->sqlAdapter :
			($this->transactionOperationSet ? $this->transactionOperationSet->getSQLAdapter() : null);
	}
247325
public static SQLDialect getDialect(DataSource dataSource) {
		if (dataSource == null) {
			return SQLDialect.DEFAULT;
		}
		try {
			String url = JdbcUtils.extractDatabaseMetaData(dataSource, "getURL");
			SQLDialect sqlDialect = JDBCUtils.dialect(url);
			if (sqlDialect != null) {
				return sqlDialect;
			}
		}
		catch (MetaDataAccessException ex) {
			logger.warn("Unable to determine jdbc url from datasource", ex);
		}
		return SQLDialect.DEFAULT;
	}
577151
public Connection getConnection() throws SQLException {
		Connection connection = this.pool.getConnection();

		// set the Transaction Isolation if defined
		try {
			// set the Transaction Isolation if defined
			if ((this.isolation != null) && (connection.getTransactionIsolation() != this.isolation.intValue())) {
				connection.setTransactionIsolation (this.isolation.intValue());
			}

			// toggle autoCommit to false if set
			if ( connection.getAutoCommit() != this.autocommit ){
				connection.setAutoCommit(this.autocommit);
			}

			return connection;
		} catch (SQLException e){
			try {
				connection.close();
			} catch (Exception e2) {
				logger.warn("Setting connection properties failed and closing this connection failed again", e);
			}

			throw e;
		}
	}
125187
public List<SqlResultSetMapping<EntityMappings<T>>> getAllSqlResultSetMapping()
   {
      List<SqlResultSetMapping<EntityMappings<T>>> list = new ArrayList<SqlResultSetMapping<EntityMappings<T>>>();
      List<Node> nodeList = childNode.get("sql-result-set-mapping");
      for(Node node: nodeList)
      {
         SqlResultSetMapping<EntityMappings<T>>  type = new SqlResultSetMappingImpl<EntityMappings<T>>(this, "sql-result-set-mapping", childNode, node);
         list.add(type);
      }
      return list;
   }
447481
public static <T, ID> RuntimeExceptionDao<T, ID> createDao(ConnectionSource connectionSource, Class<T> clazz)
			throws SQLException {
		@SuppressWarnings("unchecked")
		Dao<T, ID> castDao = (Dao<T, ID>) DaoManager.createDao(connectionSource, clazz);
		return new RuntimeExceptionDao<T, ID>(castDao);
	}
946012
public List<String> getTileTables() throws SQLException {

		List<String> tableNames = new ArrayList<String>();

		List<TileMatrixSet> tileMatrixSets = queryForAll();
		for (TileMatrixSet tileMatrixSet : tileMatrixSets) {
			tableNames.add(tileMatrixSet.getTableName());
		}

		return tableNames;
	}
1229236
public List<SchemaName> getSchemas() throws SQLException {
        final List<SchemaName> list = new ArrayList<>();
        try (ResultSet results = databaseMetadata.getSchemas()) {
            if (results != null) {
                bind(results, SchemaName.class, list);
            }
        }
        return list;
    }
700129
public List<GriddedTile> getGriddedTile() {
		List<GriddedTile> griddedTile = null;
		try {
			if (griddedTileDao.isTableExists()) {
				griddedTile = griddedTileDao
						.query(tileMatrixSet.getTableName());
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to get Gridded Tile for table name: "
							+ tileMatrixSet.getTableName(), e);
		}
		return griddedTile;
	}
644645
public static Connection getConnection() throws SQLException {
        if (LOGGER.isTraceEnabled()) {
            Callstacks.printCallstack(Level.TRACE, new String[]{"org.b3log"}, null);
        }

        if (Latkes.RuntimeDatabase.NONE == Latkes.getRuntimeDatabase()) {
            return null;
        }

        final Connection ret = hikari.getConnection();
        ret.setTransactionIsolation(transactionIsolationInt);
        ret.setAutoCommit(false);

        return ret;
    }
1212806
@Override
  public ResultSet getCatalogs() throws SQLException {
    Field[] f = new Field[1];
    List<byte[][]> v = new ArrayList<byte[][]>();
    f[0] = new Field("TABLE_CAT", Oid.VARCHAR);
    byte[][] tuple = new byte[1][];
    tuple[0] = connection.encodeString(connection.getCatalog());
    v.add(tuple);

    return ((BaseStatement) createMetaDataStatement()).createDriverResultSet(f, v);
  }
361835
@Bean
    public DataSource dataSource() throws SQLException {
        if (null != masterSlaveProperties.getMasterDataSourceName()) {
            return MasterSlaveDataSourceFactory.createDataSource(dataSourceMap, masterSlaveSwapper.swap(masterSlaveProperties), propMapProperties.getProps());
        }
        if (!encryptProperties.getEncryptors().isEmpty()) {
            return EncryptDataSourceFactory.createDataSource(dataSourceMap.values().iterator().next(), encryptSwapper.swap(encryptProperties));
        }
        return ShardingDataSourceFactory.createDataSource(dataSourceMap, shardingSwapper.swap(shardingProperties), propMapProperties.getProps());
    }