-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOPE-239: implemented all objectFunctions with extensions for cm and added tests #64
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you purposefully leave out the OBJECT_FIELD function because of the ObjectEntry?
...gon/dope/resolvable/expression/unaliased/type/function/object/ObjectInnerValuesExpression.kt
Outdated
Show resolved
Hide resolved
...ch/ergon/dope/resolvable/expression/unaliased/type/function/object/ObjectUnwrapExpression.kt
Outdated
Show resolved
Hide resolved
...rgon/dope/resolvable/expression/unaliased/type/function/object/ObjectRemoveExpressionTest.kt
Outdated
Show resolved
Hide resolved
...-map-connector/src/main/kotlin/ch/ergon/dope/extension/type/objectfunction/ObjectFunction.kt
Show resolved
Hide resolved
...-map-connector/src/main/kotlin/ch/ergon/dope/extension/type/objectfunction/ObjectFunction.kt
Show resolved
Hide resolved
...-map-connector/src/main/kotlin/ch/ergon/dope/extension/type/objectfunction/ObjectFunction.kt
Show resolved
Hide resolved
...ch/ergon/dope/resolvable/expression/unaliased/type/function/object/ObjectRenameExpression.kt
Outdated
Show resolved
Hide resolved
.../ch/ergon/dope/resolvable/expression/unaliased/type/function/object/ObjectFieldExpression.kt
Show resolved
Hide resolved
.../ch/ergon/dope/resolvable/expression/unaliased/type/function/object/ObjectFieldExpression.kt
Show resolved
Hide resolved
.../ch/ergon/dope/resolvable/expression/unaliased/type/function/object/ObjectFieldExpression.kt
Show resolved
Hide resolved
.../ch/ergon/dope/resolvable/expression/unaliased/type/function/object/ObjectFieldExpression.kt
Show resolved
Hide resolved
...gon/dope/resolvable/expression/unaliased/type/function/object/ObjectInnerValuesExpression.kt
Outdated
Show resolved
Hide resolved
...-map-connector/src/main/kotlin/ch/ergon/dope/extension/type/objectfunction/ObjectFunction.kt
Show resolved
Hide resolved
...-map-connector/src/main/kotlin/ch/ergon/dope/extension/type/objectfunction/ObjectFunction.kt
Show resolved
Hide resolved
...tal-map-connector/src/test/kotlin/ch/ergon/dope/extensions/type/object/ObjectFunctionTest.kt
Show resolved
Hide resolved
...tal-map-connector/src/test/kotlin/ch/ergon/dope/extensions/type/object/ObjectFunctionTest.kt
Show resolved
Hide resolved
...tal-map-connector/src/test/kotlin/ch/ergon/dope/extensions/type/object/ObjectFunctionTest.kt
Show resolved
Hide resolved
...gon/dope/resolvable/expression/unaliased/type/function/object/ObjectInnerValuesExpression.kt
Outdated
Show resolved
Hide resolved
2da79e1
to
c5b7e69
Compare
...in/ch/ergon/dope/resolvable/expression/unaliased/type/function/object/ObjectAddExpression.kt
Outdated
Show resolved
Hide resolved
...ch/ergon/dope/resolvable/expression/unaliased/type/function/object/ObjectLengthExpression.kt
Show resolved
Hide resolved
...ch/ergon/dope/resolvable/expression/unaliased/type/function/object/ObjectRenameExpression.kt
Outdated
Show resolved
Hide resolved
...ch/ergon/dope/resolvable/expression/unaliased/type/function/object/ObjectValuesExpression.kt
Outdated
Show resolved
Hide resolved
… can return array of different types
4a74f87
to
a3b24dc
Compare
fun TypeExpression<ObjectType>.addAttribute(objectEntryPrimitive: ObjectEntryPrimitive<out ValidType>) = | ||
ObjectAddExpression(this, objectEntryPrimitive) | ||
|
||
fun TypeExpression<ObjectType>.addAttribute(key: TypeExpression<StringType>, value: TypeExpression<out ValidType>) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are no build/integration tests, where you play around with different typeEpressions / nested-functions etc, right? Please add some
attributeKey: TypeExpression<StringType>, | ||
) : FunctionExpression<ValidType>("OBJECT_FIELD", objectExpression, attributeKey) | ||
|
||
fun TypeExpression<ObjectType>.objectField(key: TypeExpression<StringType>) = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the prefix object from the extension-funciton (You are not doing .objectConcat or similar as well).
Use a more descriptive naming, like getField()? (I'm don't know what the function should do)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or something with Attribute?, below you use that term, would not use both for the same thing)
objectExpression: TypeExpression<ObjectType>, | ||
) : FunctionExpression<ArrayType<ObjectType>>("OBJECT_INNER_PAIRS", objectExpression) | ||
|
||
fun TypeExpression<ObjectType>.innerPairs() = ObjectInnerPairsExpression(this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer to have function with a verb. Something like getInnerPairs()/createInnerPairs() or something (same for all of the functions)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should also add some integration-tests for objects
No description provided.