----- Public DBService methods: Queries
8443
@Override
    public List<DColumn> getColumns(String storeName, String rowKey,
                                    String startColumn, String endColumn, int count) {
        String tableName = storeToTableName(storeName);
        Map<String, AttributeValue> attributeMap = m_ddbClient.getItem(tableName, makeDDBKey(rowKey)).getItem();
        List<DColumn> colList =
            loadAttributes(attributeMap,
                           colName -> ((Utils.isEmpty(startColumn) || colName.compareTo(startColumn) >= 0) &&
                                       (Utils.isEmpty(endColumn) || colName.compareTo(endColumn) <= 0))
                          );
        m_logger.debug("getColumns({}, {}, {}, {}) returning {} columns",
                       new Object[]{tableName, rowKey, startColumn, endColumn, colList.size()});
        return colList;
    }
411028
public <S> S queryOne(Class<S> type, String sql, List<Object> params) {
        if (Anima.of().isUseSQLLimit()) {
            sql += " LIMIT 1";
        }
        List<S> list = queryList(type, sql, params);
        return AnimaUtils.isNotEmpty(list) ? list.get(0) : null;
    }
666269
@Override
	public ResultSet doQuery(final SqlContext sqlContext, final PreparedStatement preparedStatement,
			final ResultSet resultSet) throws SQLException {
		if (getFilters().isEmpty()) {
			return resultSet;
		}
		ResultSet rs = resultSet;
		for (final SqlFilter filter : getFilters()) {
			rs = filter.doQuery(sqlContext, preparedStatement, rs);
		}
		return rs;
	}
371786
@Override
	public ResultSet resultSet() {
		try {
			return agent().query(context());
		} catch (SQLException e) {
			throw new UroborosqlSQLException(e);
		}
	}
1017284
def query(self, queryString):
    '''
    
    '''
    self._setHeaders('query')
    return self._sforce.service.query(queryString)
1125147
public void printQuery(final Query query) {
	if (query != null) {
	    final String[] cols = query.getColumns();
	    final int rows = query.getRowCount();
	    System.out.println("[Query:" + query.getName() + "]");
	    for (int i = 0; i < cols.length; i++) {
		if (i > 0) System.out.print(", ");
		System.out.print(cols[i]);
	    }
	    System.out.println();

	    for (int row = 1; row <= rows; row++) {
		for (int col = 1; col <= cols.length; col++) {
		    if (col > 1) System.out.print(", ");
		    System.out.print(escapeString(query.getData(row, col)));
		}
		System.out.println();
	    }
	}
    }
429880
public <T> T queryForObject(String sql, Class<T> requiredType) throws SQLException {
		return queryForObject(sql, getSingleColumnRowMapper(requiredType));
	}
501835
String getQuery(String key)
    {
        String res = this.adapter.getSqlText(key);
        if (res == null)
        {
            throw new DatabaseException("Query " + key + " does not exist");
        }
        return res;
    }
932873
@Override
    public Map<String, Object> getQueryParameters() {
        HashMap<String, Object> params = new HashMap<String, Object>();
        params.put("userId", this.userId.toString());
        params.put("itemId", this.itemId.toString());
        if (this.timestamp!=null) {
            params.put("timestamp", Double.toString(this.timestamp.getTime()/1000.0));
        }
        return params;
    }
990766
def query(self, query):
    '''
    '''
    self.logger.info('%s: query %s' % (self, query))
    return super(LoggingDatastore, self).query(query)
159626
public <T> List<List<T>> queryTypedResults(String sql, String[] args,
			Integer limit) {
		return db.queryTypedResults(sql, args, limit);
	}
853349
private String subQuery(ByteBuffer buffer) {
    String queryString;
    if (options.maxQuerySizeToLog == 0) {
      queryString = new String(buffer.array(), 5, buffer.limit());
    } else {
      queryString = new String(buffer.array(), 5,
          Math.min(buffer.limit() - 5, (options.maxQuerySizeToLog * 3)));
      if (queryString.length() > options.maxQuerySizeToLog - 3) {
        queryString = queryString.substring(0, options.maxQuerySizeToLog - 3) + "...";
      }
    }
    return queryString;
  }
476944
@Override
	public void onQuery() {

		final App app = StructrApp.getInstance();
		try (final Tx tx = app.tx()) {

			final Map<String, SharedNodeInterface> nodes = new LinkedHashMap<>();
			for (final SharedNodeInterface node : app.nodeQuery(SharedNodeInterface.class).getAsList()) {
				nodes.put(node.getUuid(), node);
			}

			if (nodes.size() != repository.objectCount()) {

				logger.info("Rebuilding list of shared objects: {} vs. {}", new Object[] { nodes.size(), repository.objectCount() } );

				repository.clear();

				for (final SharedNodeInterface node : nodes.values()) {
					addObjectToRepository(node);
				}
			}

			tx.success();

		} catch (FrameworkException fex) {

			logger.warn("", fex);
		}
	}
125735
@NotNull
    public List<T> queryList() throws SQLException {
        List<T> res = new ArrayList<>();
        try (ResultSet r = statement.executeQuery()) {
            while (r.next()) {
                res.add(resultMapper.map(r));
            }
        }
        return res;
    }
211491
private void initQueries()
    {
        DbConn cnx = getConn();
        adapter.prepare(p, cnx._cnx);
        cnx.close();
    }
5484
static void query(SQLiteDatabase db, String conditions, QueryType type, OnResultListener listener) {
		String query = String.format(
				"SELECT name, sql FROM sqlite_master WHERE type='%s'and name!='sqlite_sequence' and name!='android_metadata'%s",
				type.toString().toLowerCase(), StringUtils.hasText(conditions) ? " AND " + conditions : "");
		try (Cursor cursor = db.rawQuery(query, null)) {
			if (cursor.moveToFirst()) {
				int index0 = cursor.getColumnIndex("name");
				int index1 = cursor.getColumnIndex("sql");
				do {
					listener.onRow(db, cursor.getString(index0), cursor.getString(index1));
				} while (cursor.moveToNext());
			}
		}
	}
362005
public SqlBuilder query(Query query) {
		return this.select(query.getFields()).from(query.getTableNames()).where(LogicalOperator.AND, query.getWhere());
	}