-
-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QueryBuilder and select #9
Comments
Yep. Do you have any problems with it? |
You can use \Doctrine\DBAL\Query\QueryBuilder, but not \Doctrine\ORM\QueryBuilder We couldn't find a way to override class \Doctrine\ORM\QueryBuilder |
@mochalygin , @argayash Thanks guys I have a problem with simple query: $conn = $this->get('doctrine.dbal.clickhouse_connection');
$qb = $conn->createQueryBuilder()
->from("sample_table")
->select("sample_table.sample_column")
->groupBy("sample_table.sample_column");
$s = $conn->prepare($qb->getSql());
$s->execute(); This is my Stack Traces: Doctrine\DBAL\DBALException:
An exception occurred while executing 'SELECT sample_table.sample_colunm FROM sample_table GROUP BY sample_table.sample_column':
Can`t find meta
at vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:131
at Doctrine\DBAL\DBALException::driverExceptionDuringQuery(object(Driver), object(QueryException), 'SELECT sample_table.sample_column FROM sample_table GROUP BY sample_table.sample_column', array())
(vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php:177)
at Doctrine\DBAL\Statement->execute()
(src/AnalyticsDashboardBundle/Controller/ApiController.php:166)
at AnalyticsDashboardBundle\Controller\ApiController->getUniqueInstitutions(object(Request), object(Logger))
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:202)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(web/app_dev.php:29)
at require('/data/web/analytics-dashboard/web/app_dev.php')
(vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Resources/router.php:42) When I run this query via command line there is no problem and it returns my all requested data. |
@Joozty Can you provide table structure also? |
@mochalygin I simplified the query (changed the names) but this is how I create a table: CREATE TABLE sample_table (
sample_column FixedString(15),
column_one String,
column_two Int16,
column_three Float32
) ENGINE = TinyLog |
This is the reason. Need to fix or limit smi2 version. Would you?)) |
@mochalygin yes, sure |
@isublimity @argayash |
i`m check today, and try fix |
In https://github.com/FriendsOfDoctrine/dbal-clickhouse/blob/master/src/ClickHouseStatement.php#L303
phpClickHouse : only I think true way use
|
@argayash @mochalygin Thanks, guys. It works. I had a problem with memory but when I increased memory limit in my
|
Is it possible to use QueryBuilder for select function?
Thanks
The text was updated successfully, but these errors were encountered: