Giter VIP home page Giter VIP logo

php-rethink-ql's People

Contributors

axalian avatar marcgeurts avatar tbolier avatar th3mouk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

php-rethink-ql's Issues

Selecting data: Implement between ReQL command

Issue summary

The current ReQL document manipulation commands implementation is currently missing in the driver.
https://www.rethinkdb.com/api/java/#between

Selecting data

  • between

The following sections can be removed only, whenever they are not applicable or you have a simple question.

Actual Behavior

  • Not implemented

Expected Behavior

  • A working implementation including unit / integration test.

Writing data: implement sync ReQL command

Issue summary

The current ReQL command implementation is currently missing in the driver.
https://www.rethinkdb.com/api/java/#sync

Writing data

  • sync

The following sections can be removed only, whenever they are not applicable or you have a simple question.

Actual Behavior

  • Not implemented

Expected Behavior

  • A working implementation including unit / integration test.

Accessing ReQL: Implement changes

Issue summary

We would like to listen to the change feeds via PHP.

Docs: https://rethinkdb.com/api/javascript/changes/

Issue checklist

  • Implement changes
  • Implement changes unit tests
  • Add changes documentation
  • Implement changes options
  • Implement changes options unit tests

Actual Behavior

There is no changes listener in the driver.

Expected Behavior

Given I am listening with changes
When new data is crudding
Then I should see a stream of change messages

Specifications

  • PHP Version: 7.x
  • RethinkDB Version: 2.3+

Selecting data: Implement zip ReQL commands

Issue summary

The current ReQL document manipulation commands implementation is currently missing in the driver.
https://www.rethinkdb.com/api/java/#zip

Selecting data

  • zip

The following sections can be removed only, whenever they are not applicable or you have a simple question.

Actual Behavior

  • Not implemented

Expected Behavior

  • A working implementation including unit / integration test.

Php 8 and composer installation

Currently highest version possible for PHP 8 is 1.2.1. Please adjust composer requirements to make this project installable via composer for PHP8

Thank you

Transformations: Implement remaining (missing) ReQL commands

Issue summary

The current ReQL document manipulation commands implementation is currently missing in the driver.
https://www.rethinkdb.com/api/java/

Document manipulation

  • map
  • withFields
  • concatMap
  • slice
  • nth
  • offsetsOf
  • union
  • sample

The following sections can be removed only, whenever they are not applicable or you have a simple question.

Actual Behavior

  • Not implemented

Expected Behavior

  • A working implementation including unit / integration test.

Bring unit test code coverage above 90%

Currently we only have integration tests, next to integration tests, we also need to bring the unit test code coverage above 90%. We do not have any unit test yet in the project.

Each unit should have a test, all other objects should be mocked within the test.

RebirthDB

Hey tbolier! I don't know if your driver already supports fully the 2.3 version, but we've forked RethinkDB to release a 2.4 version and all drivers will have separate repositories under our organization, discussion here: https://spectrum.chat/rebirthdb

So I'm inviting you to join us, there you can have more visibility for your project, what do you think?

Communication channel and version 2.0 discussion

Hi !

Do you have a chat or something to communicate with you ? I miss some function like now, hasFields, distinct, map, contains, without, merge, add, sub, not, ISO8601.
I would like to implement them, but I'm stuck to implement among others now, add, and not.
I don't have your logic and the way of thinking of this lib.

Thanks

Math and logic: Implement ge, le and not ReQL commands

Issue summary

The current ReQL document manipulation commands implementation is currently missing in the driver.
https://www.rethinkdb.com/api/java/

String manipulation

  • le
  • ge
  • not

The following sections can be removed only, whenever they are not applicable or you have a simple question.

Actual Behavior

  • Not implemented

Expected Behavior

  • A working implementation including unit / integration test.

Dates and times: Implement all ReQL commands

Issue summary

The current ReQL dates and times commands implementation is currently missing in the driver.

https://www.rethinkdb.com/api/java/

Dates and times

  • now
  • time
  • epochTime
  • ISO8601
  • inTimezone
  • timezone
  • during
  • date
  • timeOfDay
  • year
  • month
  • day
  • dayOfWeek
  • dayOfYear
  • hours
  • minutes
  • seconds
  • toISO8601
  • toEpochTime

The following sections can be removed only, whenever they are not applicable or you have a simple question.

Actual Behavior

  • Not implemented

Expected Behavior

  • A working implementation including unit / integration test.

Runtime error if user has no rights granted

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.

Originally posted by @mpjraaij in #76 (comment)

Document manipulation: Implement remaining (missing) ReQL commands

Issue summary

The current ReQL document manipulation commands implementation is currently missing in the driver.
https://www.rethinkdb.com/api/java/

Document manipulation

  • pluck
  • without
  • merge
  • append
  • prepend
  • difference
  • setInsert
  • setUnion
  • setIntersection
  • setDifference
  • () (bracket)
  • getField
  • hasFields
  • insertAt
  • spliceAt
  • deleteAt
  • changeAt
  • keys
  • values
  • literal
  • object

The following sections can be removed only, whenever they are not applicable or you have a simple question.

Actual Behavior

  • Not implemented

Expected Behavior

  • A working implementation including unit / integration test.

Make the integration tests work in Scrutinizer

Currently the integration tests are failing in Scrutinizer, because we do not install and setup RethinkDB in the Scrutinizer container. We should configure .scrutinizer.yml with all the necessary requirements to achieve this.

The goal is to have all the integration and unit tests run in Scrutinizer.

Improve interface segregation for ReQL query commands

Issue summary

Each function in the RethinkDB API (ReQL commands) has a set of commands in the return type interface that can be called (chained / fluent interface).

We need to improve the simplicity of the ReQL query command interface segregation. Currently the interface inheritance is really confusing for current and new developers and might violate the interface segregation SOLID principle in near future.

It is easy to make a mistake at the moment by using the wrong interface as a return type of a ReQL command. Favourable each function will return it's own interface with it's own set of (submodules) functions.

For more information about interface segregation, see:
https://www.oodesign.com/interface-segregation-principle.html

Issue checklist

  • Propose interface segregation
  • Implement new interfaces

The following sections can be removed only, whenever they are not applicable or you have a simple question.

Actual Behavior

What is it doing now?

  • We have too much confusing interfaces.
  • New API functions might not support all methods in our current query interfaces. Causing polluted interfaces and violating the interface segregation SOLID principle.

Expected Behavior

  • A new ReQL command should be easy to implement.
  • Current and new ReQL commands should favourable have their own segregated interface.

how to implement the driver in a project?

Hey, i just wanted to know how i include this in my project I never had to use "use" / namespaces.
I am only getting errormessages like :
Fatal error: Uncaught Error: Class 'TBolier\RethinkQL\Registry' not found in

Hope you dont mind explaining it to to me.

Upgrade test suite

Issue summary

Currently tests don't passed in PHP 7.2 for RowTests.php. PHP 7.3 is now in beta so we must include it too.

If Scrutinizer don't provide the feature, we might consider taking the tests under Travis CI.

Issue checklist

  • Add PHP 7.2 tests
  • Add PHP 7.3 tests

PHP Fatal error: Uncaught Error: Call to a member function write() on null in /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php:257

Hi there,

I'm testing my code on vagrant instances. Now I have Rethink running on one vm, and my code on another vm.

The db is up and running and I can access it via my browser. However inside of the code nothing happens when I run:

$connections = [
    'default' => new Options([
        'hostname' => '<internal ip>',
        'port' => 28015,
        'dbname' => 'vagrant',
        'user' => '...',
        'password' => '...'
    ]),
];
$registry = new Registry($connections);

$r = new Rethink($registry->getConnection('default'));
$r->table('trades')
  ->insert([
      [
          'documentId' => 1,
          'title' => 'Test document',
          'description' => 'My first document.'  
      ],    
  ])
  ->run();

The table exists, the stream is created and connected in socket, however I still get the following:

PHP Fatal error:  Uncaught Error: Call to a member function write() on null in /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php:257
Stack trace:
#0 /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php(163): TBolier\RethinkQL\Connection\Connection->writeQuery(588962815, Object(TBolier\RethinkQL\Message\Message))
#1 /code/vendor/tbolier/php-rethink-ql/src/Query/AbstractQuery.php(32): TBolier\RethinkQL\Connection\Connection->run(Object(TBolier\RethinkQL\Message\Message))
#2 /code/bin/OrderBook.php(33): TBolier\RethinkQL\Query\AbstractQuery->run()
#3 {main}
  thrown in /code/vendor/tbolier/php-rethink-ql/src/Connection/Connection.php on line 257

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.