Feature/spline 954 acid tx#1107
Conversation
bb321fe to
5039bcb
Compare
|
|
||
|
|
||
| export function getExecutionEventFromEventKey(eventKey: DocumentKey): ExecutionEvent { | ||
| export function getExecutionEventFromEventKey(eventKey: DocumentKey): Progress { |
There was a problem hiding this comment.
What is the reason behind this change ExecutionEvent -> Progress ?
There was a problem hiding this comment.
Just eliminating duplicated type definition. More changes are yet to be made to the model as different parts of it have being moved from other modules and consolidated on the Foxx layer.
| @@ -0,0 +1,56 @@ | |||
| /* | |||
There was a problem hiding this comment.
What is the meaning of the d int the name?
There was a problem hiding this comment.
I was struggling to find an understandable name for the directory and decided to just name it after the type of the files it contains. It's temporary here, I'm going to remove it as soon as it's promoted to the DefinitelyTyped project.
.d.ts - is a standard TypeScript type declaration file extension. In this case it's extra definition of the Foxx API that are missing form the latest version of the @types/arangodb package
| .generateJs() | ||
|
|
||
| generatedJS should be { | ||
| generatedJS shouldEqual { |
There was a problem hiding this comment.
What is the reason for this change?
There was a problem hiding this comment.
consistency. The other spec statements in the file use shouldEqual. Moreover to me it seems more appropriate and for the string comparison assertion, while be implies a predicate following it.
There was a problem hiding this comment.
There seems to be a functional difference between equal and be.
AS I understand it be always works the same as == in Scala, whereas equal will use a user-defined implicit Equality if available in scope.
Maybe it would be better to use be as a default and equal only when we need the additional functionality?
https://www.scalatest.org/user_guide/using_matchers#checkingEqualityWithMatchers
There was a problem hiding this comment.
We could. I don't see too much practical difference to be honest, but I'm fine with either. I more care about consistency though, so that the same logic of choice is applied throughout the whole code base. We can discuss it on CQC.
…o the 'tx.execute' method
…ery.LastResultPlaceholder"
… from arangodb-foxx-api module
… Remove AppTxBuilder.
…S based modules.
…eation, replace UUIDv4 TxId with ArangoDB autogen key.
…nge AQL func JS file name pattern to '*.func.js'
…in AQL queries, with the help of AQLGenHelper
e4a1838 to
e583424
Compare
2a9aa14 to
07bb430
Compare
5a55284 to
1162bf2
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
| RETURN DISTINCT readEvent | ||
| ` | ||
|
|
||
| Logger.debug(query) |
| FOR p IN allObservedEvents RETURN p | ||
| ` | ||
|
|
||
| Logger.debug(query) |
There was a problem hiding this comment.
@wajda do you really want to leave it in the codebase?
| @@ -0,0 +1,337 @@ | |||
| /* | |||
There was a problem hiding this comment.
@wajda is it typings for the fs module?
There was a problem hiding this comment.
if yes, I would recommend leaving @types/node in package.json and in the tsconfig.json
https://stackoverflow.com/questions/43048113/use-fs-in-typescript
There was a problem hiding this comment.
I tried that but unfortunately it didn't work. ArangoDB for some reason uses a slightly different File system API.
The implementation tries to follow the CommonJS Filesystem/A/0 specification where possible.
Not sure how many specs for the FS module exist in the JavaScript world, but the one @types/node provides doesn't fit what ArangoDB is using. My intention for this type-def file was to replace it with a library one as soon as possible (either I find something existing, or make a PR to the @types/arangodb)
| @@ -0,0 +1,49 @@ | |||
| /* | |||
There was a problem hiding this comment.
@wajda I would recommend reorganizing the number of subfolders, due to the complexity and avoiding the Doorway Effect
There was a problem hiding this comment.
Sure! Would you suggest anything specific? :)
dk1844
left a comment
There was a problem hiding this comment.
Read the code, have not found anything suspicious. But I must admit that I do not understand every bit of the code.








Fixes #954
arangodb-AQL-functionsmodule and moved the code to thearangodb-foxx-services