keys({ "foo" : 1, "bar" : 2 }), members([ "mercury", "venus", "earth", "mars" ]), parse-json( "{ \"foo\" : \"bar\" }" ), size([1 to 10]), serialize({ "foo" : "bar" })
"foo" "bar" "mercury" "venus" "earth" "mars" { "foo" : "bar" } 10 "{ "foo" : "bar" }"
collection("one-object"), boolean("foo"), if (1 + 1 ne 2) then error() else true
{ "question" : "What NoSQL technology should I use?" } true true
abs(-2.3), ceiling(-2.3), floor(-2.3), round(-2.3), round-half-to-even(-2.5145, 3), number("3.14"), format-integer(1234567, "000'111'222'333"), format-number(1234567.8901234, "#,###.123")
2.3 -2 -3 -2 -2.514 3.14 "000'001'234'567" "1,234,567.890"
codepoints-to-string((78, 111, 83, 81, 76)), string-to-codepoints("NoSQL"), codepoint-equal( "NoSQL", "\u004E\u006F\u0053\u0051\u004C" ), upper-case("NoSQL"), lower-case("NoSQL"), translate("NoSQL", "oN", "On"), resolve-uri("types", "http://www.jsoniq.org/"), encode-for-uri("1 + 1 is 2"), iri-to-uri( "http://www.example.com/chuchichäschtli"), escape-html-uri( "http://www.example.com/chuchichäschtli")
"NoSQL" 78 111 83 81 76 true "NOSQL" "nosql" "nOSQL" "http://www.jsoniq.org/types" "1%20%2B%201%20is%202" "http://www.example.com/chuchich%C3%A4schtli" "http://www.example.com/chuchich%C3%A4schtli"
concat("foo", 1, true, "bar", ()), string-join((1 to 10) ! string($$), "-"), string-length("123456789"), contains("NoSQL", "SQL"), starts-with("NoSQL", "No"), ends-with("NoSQL", "SQL"), substring("123456789", 5), substring-before("NoSQL", "SQL"), substring-after("NoSQL", "o"), matches("NoSQL", "No[A-Z]+"), replace("NoSQL", "No([A-Z])", "Yes$1"), tokenize( "Go Boldly Where No Man Has Gone Before", " " )
"foo1truebar" "1-2-3-4-5-6-7-8-9-10" 9 true true true "56789" "No" "SQL" true "YesSQL" "Go" "Boldly" "Where" "No" "Man" "Has" "Gone" "Before"
empty(("foo", "bar")), exists(("foo", "bar")), head(("foo", "bar")), tail(("foo", "bar")), [ insert-before(("foo", "bar"), 1, "foobar") ], remove(("foo", "bar"), 1), [ reverse(1 to 10) ], [ subsequence(1 to 10, 2, 4) ], unordered(("foo", "bar"))
false true "foo" "bar" [ "foobar", "foo", "bar" ] "bar" [ 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ] [ 2, 3, 4, 5 ] "foo" "bar"
distinct-values( ("foo", "bar", "foo", "bar", "foo") ), index-of( ("foo", "bar", "foo", "bar", "foo"), "foo"), deep-equal( { "foo" : [ 1 to 10 ] }, { lower-case("FOO") : [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] } ), zero-or-one("foo"), one-or-more(("foo", "bar")), exactly-one("foo")
"foo" "bar" 1 3 5 true "foo" "foo" "bar" "foo"
count(1 to 100), avg(1 to 100), max(1 to 100), min(1 to 100), sum(1 to 100)
100 50.5 100 1 5050
current-dateTime(), current-date(), current-time(), implicit-timezone()
"2013-06-10T15:36:59.514267+02:00" "2013-06-10+02:00" "15:36:59.514267+02:00" "PT2H"
date("2013-06-21"), time("17:00:00"), dateTime("2013-06-21T17:00:00Z"), dateTime("2013-06-21T17:00:00+01:00"), duration("P2DT1H30M15S"), hexBinary("511C7C5C9A277C22D138802F")
"2013-06-21" "17:00:00" "2013-06-21T17:00:00Z" "2013-06-21T17:00:00+01:00" "P2DT1H30M15S" "511C7C5C9A277C22D138802F"