-
Notifications
You must be signed in to change notification settings - Fork 33
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
Introduce C# driver without deployment #609
Merged
Merged
Changes from 1 commit
Commits
Show all changes
148 commits
Select commit
Hold shift + click to select a range
2bee364
Add hello world with working Bazel-Dotnet setup
farost 4bd4cfe
Divide lib and binary for the Hello World version
farost 35997ca
Rename classes for the Csharp standards
farost 3c5dce7
Add a proof of concept of using C# with bazel and BDD test framework
farost 9568747
Refactor BDD tests directories and add integration test examples
farost 02ca559
Add a proof of concept for bazel build for swig + c# app
farost 4db8a96
Add test csharp binary for testing the native dependencies
farost ce1cd50
Add howto to the .sh nuget dependencies script
farost f76ba9d
Start C# implementation, add base connectivity interfaces and impleme…
farost 4ee0168
Start writing behaviour connection tests
farost b486fca
Test BUILD
farost a5b1bdc
Generalize behaviour tests runner usage
farost 593c50b
Adapt BDD for external feature deps
farost e90114e
Remove excessive logic for remote deps
farost 0af07ea
Start writing behaviour database test
farost 0fe4318
Complete test methods' layout for the first BDD test
farost 3b2859a
Add structured BDD framework for connection tests. Fix compilation fo…
farost 4555284
Add assert to the behaviour test build
farost af58e11
Refactor bazel files and complete behaviour tests' restructure for da…
farost 7fd1769
Connect API with the implementation, fix build. Add Enumerators for n…
farost 5309a3d
Add integration tests for creating and deleting database, connection
farost c977f3c
Add most of the core steps for database connection
farost 94a6d72
Fix parallel steps for database connection tests
farost cbf0a49
Get rid off nullable and XML warnings
farost f0d6239
Fix codestyle
farost b261709
Add ValueType pointer to SWIG
farost 20c4960
Add a strange version of char**, fixed Cloud tests (now they run and …
farost f65eff5
Add the first version of exceptions (bad one)
farost e1d9d8f
Implement Exceptions, needs refactoring + cleaning + BDD test
farost d084f6c
Refactor exceptions and add steps for database connection bdd tests b…
farost 40face2
Refactor behaviour tests for steps reusage. Start session steps imple…
farost 0da1654
Add ErrorMessages, fixed dots for several drivers. WIP
farost 2ef6a47
Add missing dots to the python driver messages
farost f9577fc
Refactor error messages for the build
farost fa8e1f4
Add ErrorMessage TODO
farost fe1e640
Refactor SessionType and TransactionType. Revive throws based on the …
farost 97a4742
Add (wip) test steps for transaction, session, query and everything c…
farost 9171c0d
Add formatting for error messages from exceptions. Fix bdd tests build
farost 1dfcea0
Clean old TODOs. Add new TODOs
farost 52b4ae7
Refactor based on PR comments: refactor Session and Transaction types…
farost 89035bc
Remove excessive lock file
farost 16b9615
Refactor behaviour tests to have less copypaste
farost 93ce1e1
Rename ConnectionFixture -> ConnectionStepsBase back as it is about s…
farost 3c0ed46
Refactor namespaces and properties after review
farost f440858
Complete 5/7 session steps. Refactor for properties
farost eb9e0a7
Add additional structures to bdd tests. Fix cloud bdd tests for session
farost 9e0a6ae
Add a number of concept, logic and query API classes. Refactor old code
farost d7448c2
Add more structures for API and common. Not buildable, wip
farost b30158c
Fix comment in the java driver
farost 837c3e6
Add Promises. Fix build with the new API classes
farost e441950
Add QueryManager. Refactor small issues
farost 4e88c59
Add Concept/Answer implementation, not buildable yet
farost af08eac
Fix build for util
farost 86733bf
Add all the missing implementations for types
farost 9ecd32e
Fix build issues, mostly with dependencies. WIP
farost 731a4b4
Start fixing common's build
farost 16f4e87
Simplify namespaces. Fix Promises build. Fix methods overrides.
farost 4217598
Fix VoidPromises build + small api things
farost aca942e
Change ICollections -> IEnumerable / ISet / IList
farost 6e223be
Add arrays for custom types. Fix some build
farost 02f0172
Fix concept build, leave some todos
farost fc2b2b9
Fix build for the whole driver, more fixes and refactoring to come
farost e85a9db
Fix IDisposables. Refactor Maps
farost 705442d
Refactor packages names, util structure and some TODOs
farost 3bf7e38
Add Json dependency and test usage. Fix XML comments warnings
farost 513b81f
Refactor errors and some checks. Fix old tests
farost 644718f
Implement basic query steps for bdd, wip for it to work
farost 176f7eb
Finish Session bdd tests, push steps for transaction
farost fdbf364
Finish transaction tests
farost 28cef0d
Add User tests steps
farost e3a0677
Finish User tests
farost fc88c7a
Add implementations for Query Steps. WIP, but some tests already work
farost b58b9ce
Fix incorrect inheritance
farost 17c156f
Try to fix arrays (wip), progress for bdd tests
farost 412e351
Add memory management for the unmanaged arrays
farost 484dbde
Cleanup and todos
farost 0e98405
Collect resources after all the IEnumerable steps
farost 4a72aef
Fix old integration test
farost 9f1e83e
Add Memory test (without actual checks) to check how arrays are marsh…
farost 5b744a4
Add memory integration tests. Fix ValueType* memory management
farost 84e59d4
Finish driver query test
farost 575d826
Add tests for query/language
farost 9ac94be
Fix query tests: json comparison and one step logic
farost 9908402
Remove mockito from the deps
farost 5d4b24d
Fix match and insert tests
farost cbcdeb6
Fix precision for double, fix match tests
farost f12511e
Add base for Concept behaviour tests. WIP, not buildable
farost 5644345
Rename methods, asserts
farost cbe2034
Fix methods calls for tests, wip
farost 13f634e
Change SingleTransaction -> Tx
farost 3a7121b
Refactor Transitivity usage, fix tests
farost 79a2bd7
Test refactoring and codestyling
farost 3d7cf9b
Fix build for Concept tests, WIP
farost 7a44a7b
Refactor small api things. Fix concept test build
farost 2c57c58
Start fixing patterns for concept tests
farost 8b3672c
Update Xunit.Gherkin.Quick dependency to run scenario outlines with D…
farost a9e3aa4
Fix a number of patterns for steps, wip
farost 263cdb5
Finish Relation test
farost f44c448
Finish Thing tests
farost 7722a05
Fix regex for concept tests, most of them pass
farost 589cf11
Finish main concept tests. Add query/rule-validation test
farost 822e2f7
Clean TODOs, refactor, small fixes
farost 4fd1848
Fix transaction tests
farost 2f4eb60
Change namespace to TypeDB.Xxxx... Refactoring + todo cleaning
farost 4136f37
Add reasoner bdd tests. WIP
farost ea2ea23
Finish reasoner test (with some empty steps)
farost 7901f0b
Refactor + clean todos
farost cd91e61
Add RuleValidation test to Java
farost 7ecb8ee
Clean behaviour tests build from warnings! Start fixing User bdd...
farost 0d9f7a7
Fix User steps
farost 456554f
Clean todos and refactor a bit
farost faf80f8
Update deps. Fix old bdd tests. Progress datetime work
farost 9b2187e
Finish datetime saga
farost 60bb2b2
Cleanup for for swig file
farost 61d4b6c
Refactor Transitivity
farost eecbd79
Refactoring get -> readonly
farost 3cf6980
Rename native lib
farost 9586fe4
Refactor common things
farost 7089b1e
Fix ErrorMessage
farost 1e8328a
Add throw for wrong state of an IValue, fix docs
farost 0f86369
Make some impls' constructors internal, remove excessive Resolver
farost 55241fe
Refactor TypeDBDriverException's methods
farost 7e44328
Remove excessive usings
farost 3d680dd
Fix dependency ref and comment out excessive .factory builds
farost 0f2bf38
Add new java bdd test to automation
farost 2c33af2
Add TODO
farost 0a5f471
Add csharp tests to automation. Update maven artifacts
farost 51b6bdd
Update maven deps
farost cd91f3c
Disable python temporarily for build
farost b4ddb7b
Exclude python from build (temporarily)
farost 555ce59
Try to fix python ignoring
farost fab4cba
Fix dependencies
farost 0042590
Disable cpp for space
farost fbe134b
Make enum-like classes actual enums (ValueType WIP)
farost 410c819
Fix enums and return main build
farost 48dde68
Fix checkstyle for nuget package
farost 1151b08
Add docs for ValueType methods. Fix nuget package build
farost c95f21f
Fix checkstyle comments
farost 7d9f68d
Squeeze .factory steps declarations. Fix TestRunner float fails
farost 933531b
Fix docs for java and python
farost 0be1953
Refactor Properties <-> Methods. Fix some documentation
farost ac7577f
Fix no empty line in the end
farost 513a47e
Change Concepts -> GetConcepts
farost 2af3628
Fix linux memory marshalling
farost 08a6275
Refactor error messages codes. Update deps
farost 0af6bb7
Fix automation conflict bugs
farost c9aeaa9
Fix .factory
farost 02f2d0e
Refactor error codes. Refactor memory management
farost File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -618,17 +618,41 @@ | |
|
||
%typemap(ctype) char ** "char**" | ||
%typemap(cstype) char ** "string[]" | ||
%typemap(imtype) char ** "global::System.IntPtr" | ||
|
||
%typemap( | ||
imtype, | ||
inattributes = "[ | ||
global::System.Runtime.InteropServices.In, | ||
global::System.Runtime.InteropServices.Out, | ||
global::System.Runtime.InteropServices.MarshalAs( | ||
global::System.Runtime.InteropServices.UnmanagedType.LPArray, | ||
ArraySubType=global::System.Runtime.InteropServices.UnmanagedType.LPStr)]" | ||
) char ** "string[]" | ||
|
||
%typemap(csin) char ** "$csinput" | ||
csin, | ||
pre=" | ||
int arraySize = $csinput.Length; | ||
global::System.IntPtr unmanaged$csinput = System.Runtime.InteropServices.Marshal.AllocHGlobal( | ||
(arraySize + 1) * System.Runtime.InteropServices.Marshal.SizeOf<global::System.IntPtr>()); | ||
|
||
unsafe | ||
{ | ||
global::System.IntPtr* arrayPtr = (global::System.IntPtr*)unmanaged$csinput.ToPointer(); | ||
|
||
int i = 0; | ||
for (; i < arraySize; i++) | ||
{ | ||
arrayPtr[i] = global::System.Runtime.InteropServices.Marshal.StringToCoTaskMemAnsi($csinput[i]); | ||
} | ||
|
||
arrayPtr[i] = global::System.IntPtr.Zero; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should really just be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
}", | ||
post=" | ||
unsafe | ||
{ | ||
global::System.IntPtr* arrayPtr = (global::System.IntPtr*)unmanaged$csinput.ToPointer(); | ||
|
||
for (int i = 0; i < arraySize; i++) | ||
{ | ||
global::System.Runtime.InteropServices.Marshal.FreeHGlobal(arrayPtr[i]); | ||
} | ||
} | ||
|
||
global::System.Runtime.InteropServices.Marshal.FreeHGlobal(unmanaged$csinput);" | ||
) char ** "unmanaged$csinput" | ||
|
||
%typemap(csout) char ** | ||
{ | ||
return $imcall; | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
A stinky thing about building C# driver: it prints a lot of warnings about nullability usages within the SWIG-generated classes! So it's not even my fault. I tried to activate the nullable context, but it doesn't work everywhere, so the warnings still appear.
I'm not sure how we regularly consider warnings of different levels, but I thought you had to know about it now.
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.
Ok, thanks for the note of it!