dbms: development [#CONV-2944].

This commit is contained in:
Alexey Milovidov 2011-08-15 01:12:57 +00:00
parent b644b610bb
commit 624b31602c
6 changed files with 16 additions and 21 deletions

View File

@ -1,5 +1,4 @@
#ifndef DBMS_PARSERS_PARSERSELECTQUERY_H
#define DBMS_PARSERS_PARSERSELECTQUERY_H
#pragma once
#include <DB/Parsers/ASTSelectQuery.h>
#include <DB/Parsers/IParserBase.h>
@ -23,7 +22,7 @@ protected:
ASTPtr select_expression_list;
ParserWhiteSpaceOrComments ws;
ParserString s("SELECT", true);
ParserString s("SELECT", true, true);
ParserNotEmptyExpressionList exp_list;
ws.ignore(pos, end);
@ -46,5 +45,3 @@ protected:
};
}
#endif

View File

@ -1,22 +1,20 @@
#ifndef DBMS_STORAGES_ISTORAGE_H
#define DBMS_STORAGES_ISTORAGE_H
//#include <boost/property_tree/ptree.hpp>
#pragma once
#include <Poco/SharedPtr.h>
#include <DB/Core/Defines.h>
#include <DB/Core/Names.h>
#include <DB/Core/Exception.h>
#include <DB/DataStreams/IBlockInputStream.h>
#include <DB/DataStreams/IBlockOutputStream.h>
#include <DB/Parsers/IAST.h>
namespace DB
{
typedef char ptree; /// временная заглушка, вместо boost::property_tree::ptree
//using boost::property_tree::ptree;
using Poco::SharedPtr;
/** Хранилище. Отвечает за:
@ -40,7 +38,7 @@ public:
*/
virtual SharedPtr<IBlockInputStream> read(
const Names & column_names,
const ptree & query,
ASTPtr query,
size_t max_block_size = DEFAULT_BLOCK_SIZE)
{
throw Exception("Method read() is not supported by storage " + getName());
@ -51,7 +49,7 @@ public:
* Возвращает объект, с помощью которого можно последовательно писать данные.
*/
virtual SharedPtr<IBlockOutputStream> write(
const ptree & query)
ASTPtr query)
{
throw Exception("Method write() is not supported by storage " + getName());
}
@ -59,6 +57,6 @@ public:
virtual ~IStorage() {}
};
}
typedef SharedPtr<IStorage> StoragePtr;
#endif
}

View File

@ -90,11 +90,11 @@ public:
SharedPtr<IBlockInputStream> read(
const Names & column_names,
const ptree & query,
ASTPtr query,
size_t max_block_size = DEFAULT_BLOCK_SIZE);
SharedPtr<IBlockOutputStream> write(
const ptree & query);
ASTPtr query);
private:
const std::string path;

View File

@ -34,7 +34,7 @@ public:
SharedPtr<IBlockInputStream> read(
const Names & column_names,
const ptree & query,
ASTPtr query,
size_t max_block_size = DEFAULT_BLOCK_SIZE);
};

View File

@ -94,7 +94,7 @@ StorageLog::StorageLog(const std::string & path_, const std::string & name_, Sha
SharedPtr<IBlockInputStream> StorageLog::read(
const Names & column_names,
const ptree & query,
ASTPtr query,
size_t max_block_size)
{
return new LogBlockInputStream(max_block_size, column_names, *this);
@ -102,7 +102,7 @@ SharedPtr<IBlockInputStream> StorageLog::read(
SharedPtr<IBlockOutputStream> StorageLog::write(
const ptree & query)
ASTPtr query)
{
return new LogBlockOutputStream(*this);
}

View File

@ -40,7 +40,7 @@ Block NumbersBlockInputStream::read()
SharedPtr<IBlockInputStream> StorageSystemNumbers::read(
const Names & column_names, const ptree & query, size_t max_block_size)
const Names & column_names, ASTPtr query, size_t max_block_size)
{
if (column_names.size() != 1)
throw Exception("Incorrect number of columns.", ErrorCodes::INCORRECT_NUMBER_OF_COLUMNS);