Comments (4)
Hi @mpjraaij
Before you execute the query, please execute $r->connection()->connect();
The fatal error that caused your error is related to not having connected first, so there is no open stream.
I have updated the code, to throw a proper ConnectionException
in that case. I've also updated the documentation which was missing the $r->connection()->connect();
reference.
Thanks for reporting this.
You can immediately fix your issue with your current version of the library by connecting first.
Let me know if that sorted it for you?
Cheers
from php-rethink-ql.
This issue has been resolved.
from php-rethink-ql.
Thanks!
That did not fully solve it. To test I'm now using this code:
$r = new Rethink($registry->getConnection('default'));
$r->connection()->connect();
$r->db()
->tableCreate('test')
->run();
I'm getting a Runtime Error:
PHP Fatal error: Uncaught TBolier\RethinkQL\Connection\ConnectionException: Runtime error: U, jsonQuery: [1,[60,[[1,"test"]]],{"db":[14,["vagrant"]]}] in/code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php:372
Stack trace:
#0 /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php(334): TBolier\RethinkQL\Connection\Connection->validateResponse(Object(TBolier\RethinkQL\Response\Response), 820726866, 820726866, Object(TBolier\RethinkQL\Message\Message))
#1 /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php(169): TBolier\RethinkQL\Connection\Connection->receiveResponse(820726866, Object(TBolier\RethinkQL\Message\Message))
#2 /code/vendor/tbolier/php-rethink-ql/src/Query/AbstractQuery.php(32): TBolier\RethinkQL\Connection\Connection->run(Object(TBolier\RethinkQL\Message\Message))
#3 /code/bin/OrderBook.php(28): TBolier\RethinkQL\Query\AbstractQuery->run()
#4 {main}
Next TBolier\RethinkQL\Connection\ConnectionException: Runtime error: U, jsonQuery: [1,[60,[[1,"test"]]],{"db":[14,["vagrant"]] in /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php on line 181
This is because I did not grant the permissions to the user yet. Might need a different error message.
from php-rethink-ql.
...
This is because I did not grant the permissions to the user yet. Might need a different error message.
Thanks I have created a new issue for that one here: #78
from php-rethink-ql.
Related Issues (20)
- Improve interface segregation for ReQL query commands HOT 6
- Manipulating tables: Implement indexStatus ReQL command
- Manipulating tables: Implement indexWait ReQL command
- Writing data: implement sync ReQL command HOT 2
- Dates and times: Implement all ReQL commands
- Document manipulation: Implement remaining (missing) ReQL commands HOT 1
- Selecting data: Implement Joins, innerJoin, outerJoin, eqJoin ReQL commands
- Selecting data: Implement zip ReQL commands HOT 1
- Aggregation: Implement reduce, fold, distinct and contains ReQL commands
- Selecting data: Implement between ReQL command HOT 1
- Transformations: Implement remaining (missing) ReQL commands
- RebirthDB HOT 2
- Math and logic: Implement ge, le and not ReQL commands HOT 3
- how to implement the driver in a project? HOT 4
- Upgrade test suite HOT 3
- Accessing ReQL: Implement changes HOT 3
- Runtime error if user has no rights granted HOT 1
- 2.0 release - changes function HOT 4
- Php 8 and composer installation
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 php-rethink-ql.