You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by be...@apache.org on 2023/02/21 01:10:54 UTC

[tinkerpop] branch proposal_3 updated: Updated per feedback

This is an automated email from the ASF dual-hosted git repository.

bechbd pushed a commit to branch proposal_3
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/proposal_3 by this push:
     new 7fe7fb7ba7 Updated per feedback
7fe7fb7ba7 is described below

commit 7fe7fb7ba73a554b97ad7cba2358f0d5aad1b1b5
Author: Dave Bechberger <da...@bechberger.com>
AuthorDate: Tue Feb 21 01:10:29 2023 +0000

    Updated per feedback
---
 .../dev/future/proposal-3-remove-closures.asciidoc | 166 +++++++++++++--------
 1 file changed, 102 insertions(+), 64 deletions(-)

diff --git a/docs/src/dev/future/proposal-3-remove-closures.asciidoc b/docs/src/dev/future/proposal-3-remove-closures.asciidoc
index 7de3695902..bb1a84913d 100644
--- a/docs/src/dev/future/proposal-3-remove-closures.asciidoc
+++ b/docs/src/dev/future/proposal-3-remove-closures.asciidoc
@@ -317,18 +317,18 @@ The proposal here is to add a set of steps to handle common string
 manipulation requests from users, the details for each are discussed
 below:
 
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#asstring[asString()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#concat[concat()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#length[length()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#split[split()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#substring[substring()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#rtrim[rTrim()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#ltrim[lTrim()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#trim[trim()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#replace[replace()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#reverse[reverse()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#toupper[toUpper()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#tolower[toLower()]
+* <<asString, asString()>>
+* <<concat, concat()>>
+* <<length, length()>>
+* <<split, split()>>
+* <<substring, substring()>>
+* <<rTrim, rTrim()>>
+* <<lTrim, lTrim()>>
+* <<trim, trim()>>
+* <<replace, replace()>>
+* <<reverse, reverse()>>
+* <<toUpper, toUpper()>>
+* <<toLower, toLower()>>
 
 === Gremlin Language Variant Function Names
 
@@ -365,7 +365,7 @@ below:
 
 == Function Definitions
 
-=== `asString()`
+=== `asString()` [[asString]]
 
 Returns the value of the incoming traverser as a string
 
@@ -422,7 +422,7 @@ passed in as shown below:
 
 '''''
 
-=== `concat()`
+=== `concat()` [[concat]]
 
 Concatenates one or more strings together
 
@@ -469,7 +469,7 @@ values together but that is out of scope for this change.
 
 '''''
 
-=== `length()`
+=== `length()` [[length]]
 
 Returns the length of the input string
 
@@ -536,7 +536,7 @@ provides the length of that array.
 
 '''''
 
-=== `split()`
+=== `split()` [[split]]
 
 Returns a list of strings created by splitting the input string around
 the matches of the given delimiter.
@@ -576,7 +576,7 @@ g.inject(['this', 'that']).split('h')
 
 '''''
 
-=== `substring()`
+=== `substring()` [[substring]]
 
 returns a substring of the original string with the length specified,
 uses a 0-based start
@@ -628,7 +628,7 @@ g.inject(['this', 'is', 'a', 'test']).substring(local, 2)
 
 '''''
 
-=== `rTrim()`
+=== `rTrim()` [[rTrim]]
 
 Returns a string with trailing whitespace removed
 
@@ -664,7 +664,7 @@ g.inject(['this ', 'that ']).rTrim(local)
 
 '''''
 
-=== `lTrim()`
+=== `lTrim()` [[lTrim]]
 
 Returns a string with leading whitespace removed
 
@@ -700,7 +700,7 @@ g.inject([' this', ' that']).lTrim(local)
 
 '''''
 
-=== `trim()`
+=== `trim()` [[trim]]
 
 Returns a string with leading and trailing whitespace removed
 
@@ -736,7 +736,7 @@ g.inject([' this ', ' that ']).trim()
 
 '''''
 
-=== `replace()`
+=== `replace()` [[replace]]
 
 Returns a string with the specified characters in the original string
 replaced with the new characters
@@ -776,7 +776,7 @@ g.inject(['this', 'that']).replace('th', 'was')
 
 '''''
 
-=== `reverse()`
+=== `reverse()` [[reverse]]
 
 Reverses the current string
 
@@ -812,7 +812,7 @@ values together but that is out of scope for this change.
 
 '''''
 
-=== `toUpper()`
+=== `toUpper()` [[toUpper]]
 
 Returns an upper case string representation.
 
@@ -848,7 +848,7 @@ g.inject(['this', 'that']).toUpper()
 
 '''''
 
-=== `toLower()`
+=== `toLower()` [[toLower]]
 
 Returns an lower case string representation
 
@@ -899,18 +899,19 @@ The proposal here is to add a set of steps to handle common list
 manipulation requests from users, the details for each are discussed
 below:
 
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#length[length()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#reverse[reverse()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#remove[remove()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#indexOf[indexOf()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#product[product()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#all[all()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#any[any()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#none[none()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#concat[concat()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#intersect[intersect()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#union[union()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#difference[difference()]
+* <<length_list, length()>>
+* <<reverse_list, reverse()>>
+* <<remove_list, remove()>>
+* <<indexOf_list, indexOf()>>
+* <<product_list, product()>>
+* <<all_list, all()>>
+* <<any_list, any()>>
+* <<none_list, none()>>
+* <<concat_list, concat()>>
+* <<intersect_list, intersect()>>
+* <<union_list, union()>>
+* <<difference_list, difference()>>
+* <<disjunct_list, disjunct()>>
 
 === Gremlin Language Variant Function Names
 
@@ -942,13 +943,16 @@ below:
 
 |difference() |difference() |difference() |difference() |Difference()
 |Difference()
+
+|disjunct() |disjunct() |disjunct() |disjunct() |Disjunct()
+|Disjunct()
 |===
 
 '''''
 
 == Function Definitions
 
-=== `length()`
+=== `length()` [[length_list]]
 
 Returns the length of a list in the incoming traverser
 
@@ -975,7 +979,7 @@ g.inject([1, 2]).length()
 ==>2
 ....
 
-=== `reverse()`
+=== `reverse()` [[reverse_list]]
 
 Returns the value of the incoming list in reverse order
 
@@ -1001,7 +1005,7 @@ g.inject([1,2]).reverse()
 ==>[2, 1]
 ....
 
-=== `remove()`
+=== `remove()` [[remove_list]]
 
 Removes the first element from the incoming list where the value equals
 the specified value
@@ -1030,8 +1034,8 @@ g.inject([1,2]).remove(1)
 ==>[2]
 ....
 
-=== `indexOf()`
-
+=== `indexOf()` [[indexOf_list]]
+ 
 Returns the first occurrence of the `value` in the incoming array
 
 ==== Signature(s)
@@ -1059,7 +1063,7 @@ g.inject([1,2]).indexOf(1)
 ==>0
 ....
 
-=== `product()`
+=== `product()` [[product_list]]
 
 Returns the cartesian product of two lists
 
@@ -1088,7 +1092,7 @@ g.inject([1,2]).product([3,4])
 ==>[[1,3], [1,4], [2,3], [2,4]]
 ....
 
-=== `any()`
+=== `any()` [[any_list]]
 
 Returns true if any items in the array `value` exist in the input
 
@@ -1118,7 +1122,7 @@ g.inject([1,2]).any([3])
 ==>false
 ....
 
-=== `all()`
+=== `all()` [[all_list]]
 
 Returns true if all items in the array `value` exist in the input
 
@@ -1150,7 +1154,7 @@ g.inject([1,2]).all([3])
 ==>false
 ....
 
-=== `none()`
+=== `none()` [[none_list]]
 
 Returns true if no items in the array `value` exist in the input
 
@@ -1182,7 +1186,7 @@ g.inject([1,2]).none([3])
 ==>true
 ....
 
-=== `concat()`
+=== `concat()` [[concat_list]]
 
 Returns the concatenation of the incoming array and the traversal or
 array value passed as a parameter. This will return all values,
@@ -1216,7 +1220,7 @@ g.V().has('age', 29).values('age').dedup().fold().concat(V().has('age', 30).valu
 ==>[29, 30]
 ....
 
-=== `union()`
+=== `union()` [[union_list]]
 
 Returns the union of the incoming array and the traversal or array value
 passed as a parameter. This will return an array of unique values
@@ -1249,7 +1253,7 @@ g.V().has('age', 29).values('age').dedup().fold().union(V().has('age', 30).value
 ==>[29, 30]
 ....
 
-=== `intersect()`
+=== `intersect()` [[intersect_list]]
 
 Returns the intersection of the incoming array and the traversal or
 array value passed as a parameter. This will return an array of unique
@@ -1284,7 +1288,7 @@ g.V().has('age', 29).values('age').dedup().fold().intersect(V().has('age', 30).v
 ==>[]
 ....
 
-=== `difference()`
+=== `difference()` [[difference_list]]
 
 Returns the difference of the incoming array and the traversal or array
 value passed as a parameter. This will return an array of unique values
@@ -1318,6 +1322,40 @@ g.V().has('age', 29).values('age').dedup().fold().difference(V().has('age', 30).
 ==>[29, 30]
 ....
 
+....
+
+=== `disjunct()` [[disjunct_list]]
+
+Returns the disjunct set of the incoming array and the traversal or array
+value passed as a parameter. This will return an array of unique values
+
+==== Signature(s)
+
+`disjunct(value)`
+
+`disjunct(Traversal)`
+
+==== Parameters
+
+* value - An array of the items to check in the incoming list
+
+==== Allowed incoming traverser types
+
+Array data types. If non-array data types are passed in then an
+`IllegalArgumentException` will be thrown
+
+==== Expected Output
+
+An array containing the different values of the intersection of the two
+lists
+
+....
+g.inject([1,2]).disjunct([1])
+==>[2]
+g.inject([1,2,4]).disjunct([1, 2, 3])
+==>[3, 4]
+
+
 
 == Date Manipulation functions in TinkerPop [[date-function-syntax]]
 
@@ -1331,13 +1369,13 @@ manipulate strings directly.
 
 === Proposal
 
-The proposal here is to add a set of steps to handle common date
+The proposal here is to add a set of steps to handle common datetime
 manipulation requests from users, the details for each are discussed
 below:
 
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#asDate[asDate()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#dateAdd[dateAdd()]
-* https://gist.github.com/bechbd/6de5d3d81fdb765166e435d961b0ccef#dateDiff[dateDiff()]
+* <<asDate, asDate()>>
+* <<dateAdd, dateAdd()>>
+* <<dateDiff, dateDiff()>>
 
 === Gremlin Language Variant Function Names
 
@@ -1351,7 +1389,7 @@ below:
 
 == Function Definitions
 
-=== `asDate()`
+=== `asDate()` [[asDate]]
 
 Returns the value of the incoming traverser as an ISO-8601 date
 
@@ -1392,7 +1430,7 @@ passed in as shown below:
 |`g.inject([["id": 1], ["id": 2, "something":"anything"]]).asDate()`
 |`IllegalArgumentException`]
 
-|Date |`g.inject(datetime()).asDate()` |2023-02-16T01:36:40.27Z
+|Datetime |`g.inject(datetime()).asDate()` |Sun Nov 04 00:00:00 UTC 2018
 
 |List |`g.inject([1,2,3]).asDate()` |`IllegalArgumentException`
 
@@ -1410,7 +1448,7 @@ passed in as shown below:
 |`IllegalArgumentException`
 |===
 
-=== `dateAdd()`
+=== `dateAdd()` [[dateAdd]]
 
 Returns the value with the addition of the `value` number of units as
 specified by the `DateToken`
@@ -1424,17 +1462,17 @@ specified by the `DateToken`
 ==== Parameters
 
 * DateToken - DateToken Enum
-* value - The number of units, specified by the Date Token, to add to
+* value - The number of units, specified by the Datetime Token, to add to
 the incoming values
 
 ==== Allowed incoming traverser types
 
-Date data types. If non-array data types are passed in then an
+Datetime data types. If non-array data types are passed in then an
 `IllegalArgumentException` will be thrown
 
 ==== Expected Output
 
-A Date with the value added.
+A Datetime with the value added.
 
 ....
 g.inject(datetime()).dateAdd(DT.days, 7)
@@ -1445,9 +1483,9 @@ g.inject([datetime(), datetime()]).dateAdd(local, DT.days, 7)
 ==> [2018-03-22, 2018-03-22]
 ....
 
-=== `dateDiff()`
+=== `dateDiff()` [[dateDiff]]
 
-Returns the difference between two dates in epoch time
+Returns the difference between two Datetimes in epoch time
 
 ==== Signature(s)
 
@@ -1459,11 +1497,11 @@ Returns the difference between two dates in epoch time
 
 ==== Parameters
 
-* value - The date to find the difference from
+* value - The Datetime to find the difference from
 
 ==== Allowed incoming traverser types
 
-Date data types. If non-array data types are passed in then an
+Datetime data types. If non-array data types are passed in then an
 `IllegalArgumentException` will be thrown
 
 ==== Expected Output
@@ -1475,6 +1513,6 @@ g.inject(datetime()).dateDiff(datetime().dateAdd(DT.days, 7))
 ==> 604800
 g.inject(datetime()).dateDiff(datetime().dateAdd(DT.days, 7))
 ==> -604800
-g.inject([datetime(), datetime()]).dateAdd(local, DT.days, 7)
+g.inject([datetime(), datetime()]).dateDiff(local, DT.days, 7)
 ==> [604800, 604800]
 ....