Skip to content

API Documentation: Example for zip is faulty. #691

Closed

Description

@danielmewes

The example for zip in the JS API doc reads:

r.table('t1').eqJoin('t2', 'id').zip().run(conn, callback)

The arguments to eqJoin here seem to be invalid. First, the order should be ('id', 't2'). Second, 't2' should really be r.table('t2'). So overall, the following would actually work:

r.table('t1').eqJoin('id', r.table('t2')).zip().run(conn, callback)

The examples for the other languages look similarly wrong.

Activity

  1. al3xandru commented on Apr 21, 2013

    @al3xandru
    Contributor

    Thanks for the catch @danielmewes. I'll fix this right away, but there might be a delay until we push the change to the site.

  2. danielmewes commented on Apr 21, 2013

    @danielmewes
    MemberAuthor

    Thanks!

  3. added a commit that references this issue on Apr 22, 2013
  4. ghost assigned on Apr 22, 2013
  5. al3xandru commented on Apr 22, 2013

    @al3xandru
    Contributor

    The API docs were fix. I'm leaving this open so @AtnNn can check why the corresponding tests were still passing.

  6. danielmewes commented on Apr 24, 2013

    @danielmewes
    MemberAuthor

    I believe the validation tests don't care much about what is sent to the server.
    And the drivers don't do a lot of type checking on their side either, do they?

  7. al3xandru commented on Apr 24, 2013

    @al3xandru
    Contributor

    Yep, I think the validations tests are just checking syntax. But I was under the impression that we rewritten these docs so they are the basis of real tests too. This is the part that should have caught the issue.

  8. coffeemug commented on Apr 24, 2013

    @coffeemug
    Contributor

    The docs aren't currently the basis of examples. They just share a similar yaml format, and we run a validator on doc examples (which merely checks that the query compiles). We still have to do a lot of work to actually run the examples, which will take some time. @AtnNn -- can you confirm that doc validation is part of the Travis build?

  9. AtnNn commented on Apr 24, 2013

    @AtnNn
    Member

    Documentation validation is not being run on travis because it needs the ruby driver.

  10. AtnNn commented on Apr 25, 2013

    @AtnNn
    Member

    To be able to fully test the documentation examples we would need to have

    • a sample database that they can be run on,
    • a specific order in which to run them,
    • and the expected output.

    The python script that runs the tests would need to be rewritten.

  11. added a commit that references this issue on May 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions