Comments (10)
Собрал 1.1.2
from phpclickhouse.
У вас последняя версия?
я попробую поправить их поведение, но вообще bindings + conditions is deprecated
from phpclickhouse.
У вас последняя версия?
На момент написания была последняя из Git.
bindings + conditions is deprecated
Хм. Не видел нигде, что bindings стали deprecated. А как тогда переписать, например, первый запрос? Есть какая-то альтернатива bindings?
from phpclickhouse.
Да что то с bindings is deprecated я погорячился )
У меня сейчас нет решения этой проблемы,
Сделал более обширный тест по текущему состоянию : https://github.com/smi2/phpClickHouse/blob/master/tests/00_BindingsTest.php
Возможно кто то сможет портировать
CodeIgniter->bind()
: https://github.com/bcit-ci/CodeIgniter/blob/develop/system/database/DB_driver.php#L920
from phpclickhouse.
Второй пример теперь работает. Первый - по-прежнему выдаёт ошибку.
from phpclickhouse.
Первый пример он спорный)))
bind внутри bind
я использую для этого конструкцию {key}
А как вы видите это должно работать?
from phpclickhouse.
Как мне кажется, значения массива должны просто подставляться именно как конечные значения и не парситься дальше. Допустим, какая-то форма в приложении запрашивает два поля "a" и "b". Юзер вводит туда строки ":b" и ":a" соответственно. Это вызовет вышеописанную ошибку в БД.
Т.е. первый пример должен, по логике, выдавать то же самое, что и запрос SELECT ':b', ':a';
(т.е. просто строки, которые были во входных данных).
from phpclickhouse.
Согласен убрал на :
двойной прогон - перезалил 1.1.1 сборку
$keys=[
'A'=>'{B}',
'B'=>':C',
'C'=>123,
'Z'=>[':C',':B',':C']
];
$this->assertEquals(
"123 ':C',':B',':C' FORMAT JSON",
$this->client->selectAsync('{A} :Z', $keys)->sql()
);
from phpclickhouse.
перезалил 1.1.1 сборку
Через composer всё равно ставится старая версия 1.1.1 (без коммитов "DoubleBind").
from phpclickhouse.
Ок, теперь, кажись, всё. Спасибо!
from phpclickhouse.
Related Issues (20)
- Migrating to the GitHub action
- Error code not parsed after Clickhouse update
- Release 1.5.0 introduces BREAKING CHANGES HOT 4
- Cannot use socket_timeout HOT 1
- CountAll() giving different values for same query HOT 2
- Client::partitions finds partitions from wrong tables HOT 2
- ALTER TABLE? How? HOT 2
- FR: progressFunction on write
- help
- Unexpected readonly mode with specific string in query HOT 3
- Error use
- connect on domain
- Operation timed out after 60000 milliseconds with 0 bytes received
- How to check insertBatchFiles is finished HOT 1
- Using insertBatchFiles with CSVWithNamesAndTypes is not possible HOT 3
- Critical errror with insert. HOT 3
- Converting boolean when inserting into int
- Php syntax error in php ^7.3 HOT 1
- Error when inserting boolean values HOT 2
- readonly flag doesn't work with insert() HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpclickhouse.