Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ Even more queries can be found [here](https://colab.research.google.com/github/R

# Latest updates

## Version 2.0.3
- Some unquoted strings (like document, binary, pi, etc) were not properly recognized and could not be used as variable names or for unquoted object lookup. This is now fixed.

## Version 2.0.2
- Add MongoDB connection (mongodb-collection()). Requires including .withMongo() when creating the RumbleSession.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "jsoniq"
version = "2.0.2"
version = "2.0.3"
description = "Python edition of RumbleDB, a JSONiq engine"
requires-python = ">=3.11"
dependencies = [
Expand Down
Binary file modified src/jsoniq/jars/rumbledb-2.0.0.jar
Binary file not shown.
19 changes: 19 additions & 0 deletions tests/test_bugfix_keywords.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from jsoniq import RumbleSession
from unittest import TestCase
import json
class TryTesting(TestCase):
def test1(self):
# The syntax to start a session is similar to that of Spark.
# A RumbleSession is a SparkSession that additionally knows about RumbleDB.
# All attributes and methods of SparkSession are also available on RumbleSession.
rumble = RumbleSession.builder.appName("PyRumbleExample").getOrCreate();
# A more complex, standalone query

seq = rumble.jsoniq("""
let $node := { "binary" : "af12" }
return $node.binary
""");

expected = ('af12',)

self.assertTrue(json.dumps(seq.json()) == json.dumps(expected))