synchronized public ArrayList<DBField> getFields(DBTable table, DBValue[] where, Object[] values) throws Exception {
		ArrayList<DBField> fields = tables.get(table);
		if (fields == null)
			throw new Exception();
		if (where != null && values != null)
			if (where.length != values.length)
				throw new Exception();
		ArrayList<DBField> ret = new ArrayList<DBField>();
		for (int i = 0; i < fields.size(); i++)
			if (fields.get(i).contains(where, values))
				ret.add(fields.get(i).create());
		return ret;
	}