yojimbo87 / orientdb-net.binary Goto Github PK
View Code? Open in Web Editor NEWC#/.NET binary driver for OrientDB
License: MIT License
C#/.NET binary driver for OrientDB
License: MIT License
Hey there,
i got your Package over "NuGet" (Version 0.2.1) and got there the following Situation but not in the current GitHub-Version (0.2.1):
when i create three vertex and connect (create two edges) the first one with the other verticies and run the following command "select from #9:0" then i got an InvalidFormatException.
For Instance:
Create Vertex; (#9:0)
Create Vertex; (#9:1)
Create Vertex; (#9:2)
Create Edge from #9:0 to #9:1;
Create Edge from #9:0 to #9:2;
C# Command:
database.Query("select from #9:0");
Now i got the InvalidFormatException if i run the Command in the OrientDB Studio everything works fine. The the interesting point is, that the exception is only throw, when i created the second Edge, if only one edge is connecting the two verticies, then the command succeeded.
When i build your packacke from GitHub and include it in my Sourcecode, the Command works.
From binary protocol docs:
Sets (collections without duplicates) must be enclosed by < and > characters. E.g. <1,2,3>, <#10:3,#10:4> and <(name:"Luca")>. There is a special case when use LINKSET type reported in detail in Special use of LINKSET types section. Before rel.15 SET type was stored as a list (see upon).
Implement special use of linkset type parsing.
https://groups.google.com/forum/#!msg/orient-database/OFdJzu8eqD0/1L5JoBHp4hoJ
https://github.com/gabipetrovay/node-orientdb/blob/master/lib/orientdb/db.js
Hello,
Your work has been mentioned here:
Loupi/Frontenac#1
How should I implement massive insert in OrientDB I have 10K Vertex have almost 1M Edges how should i Load as fast as possible? Currently i am using this for loop and it takes more than 30 mins to complete.
Please suggest some feasible solution.
List _listRating = LoadRatings(_PathRatings);
foreach (Rating r in _listRating)
{
i++;
oDB.Command(" create edge rated from (select from Users where userID = " + r.userID + ") to (select from Movies where MovieID = " + r.movieID + " ) set rating =" + r.Ratings + " ");
Console.WriteLine("Creating Ratings...." + i.ToString());
}
Support out of order chaining, e.g. user can do
Create.Vertex(fooDoc)
.Cluster()
.Run();
and it will generate
CREATE VERTEX Foo CLUSTER Bar SET foo = 1, bar = 2
instead of
CREATE VERTEX Foo SET foo = 1, bar = 2 CLUSTER Bar
To simplify the API it would be good to drop ORecord class and have only ODocument which will include standard record fields such as ORID, className, classId, ... with the @ character prefix.
I'm getting TypeMapper exception when trying to persist object that is of class Event.
Event class not just simple class, it has subclasses as properties.
What kind of fields cannot be persisted to Orient using OrientDB-NET.binary?
using (ODatabase database = new ODatabase("ntt"))
{
// prerequisites
//database.Create.Class<Event>().Run();
StreamReader reader = new StreamReader(@"event1.json");
string json = reader.ReadToEnd();
reader.Close();
Event sample_event = Event.Deserialize(json);
Event insertedDocument = database
.Insert(sample_event)
.Run<Event>();
}
System.TypeInitializationException was unhandled
HResult=-2146233036
Message=The type initializer for 'Orient.Client.Mapping.TypeMapper1' threw an exception. Source=Orient.Client TypeName=Orient.Client.Mapping.TypeMapper
1
StackTrace:
at Orient.Client.Mapping.TypeMapper1.get_Instance() in c:\Temp\OrientDB\Orient.Client\Mapping\TypeMapper.cs:line 30 at Orient.Client.Mapping.ClassFieldMapping
2.MapToDocument(TTarget typedObject, ODocument document) in c:\Temp\OrientDB\Orient.Client\Mapping\ClassFieldMapping.cs:line 21
at Orient.Client.Mapping.FieldMapping1.MapToDocument(Object typedObject, ODocument document) in c:\Temp\OrientDB\Orient.Client\Mapping\FieldMapping.cs:line 51 at Orient.Client.Mapping.TypeMapper
1.ToDocument(Object genericObject) in c:\Temp\OrientDB\Orient.Client\Mapping\TypeMapper.cs:line 151
at Orient.Client.Mapping.ClassFieldMapping2.MapToDocument(TTarget typedObject, ODocument document) in c:\Temp\OrientDB\Orient.Client\Mapping\ClassFieldMapping.cs:line 21 at Orient.Client.Mapping.FieldMapping
1.MapToDocument(Object typedObject, ODocument document) in c:\Temp\OrientDB\Orient.Client\Mapping\FieldMapping.cs:line 51
at Orient.Client.Mapping.TypeMapper1.ToDocument(Object genericObject) in c:\Temp\OrientDB\Orient.Client\Mapping\TypeMapper.cs:line 151 at Orient.Client.ODocument.ToDocument[T](T genericObject) in c:\Temp\OrientDB\Orient.Client\API\Types\ODocument.cs:line 298 at Orient.Client.Protocol.SqlQuery.Insert[T](T obj) in c:\Temp\OrientDB\Orient.Client\Protocol\Query\SqlQuery.cs:line 76 at Orient.Client.OSqlInsert.Insert[T](T obj) in c:\Temp\OrientDB\Orient.Client\API\Query\OSqlInsert.cs:line 43 at Orient.Client.ODatabase.Insert[T](T obj) in c:\Temp\OrientDB\Orient.Client\API\ODatabase.cs:line 115 at OrientDBTest.Program.Main(String[] args) in c:\TFS\NGP\NTT\Main\Auxillary\OrientDBTest\Program.cs:line 51 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.NotImplementedException HResult=-2147467263 Message=No mapping implemented for type Nullable
1
Source=Orient.Client
StackTrace:
at Orient.Client.Mapping.TypeMapper1..ctor() in c:\Temp\OrientDB\Orient.Client\Mapping\TypeMapper.cs:line 105 at Orient.Client.Mapping.TypeMapper
1..cctor() in c:\Temp\OrientDB\Orient.Client\Mapping\TypeMapper.cs:line 29
InnerException:
Insert(doc).Into()
All tests failed on machine with OrientDB already running. Is better to verify OrientDB status before tests or check if path exists.
Hi,
I experienced a problem with certain queries where the stream read from the network was not complete. I think there's a problem with the way you read from the network stream. You're relying on stream.DataAvailable to stop reading from the stream. However, this property indicates if there's something to read at that time, not if the server is done sending data. I fixed the problem by parsing the message sent from the server using your current parsing algorithm, but instead of working on the buffer array, I work directly on the network stream using the sets of methods on BinaryReader. So I stop reading from the stream when the flag in the data indicates that there's nothing else to read.
Let me know if you would like more information.
Thanks!
Create custom exceptions - e.g. OException
I'm not sure this issue has been already reported or not. Issue is
My web application is already running. Connection pool is initialized only once in a static constructor. It works fine and I can connect to database and make queries.
If I restart orient-db server, then all queries break with IOException "Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host."
If I try to drop connection pool in case of IO error again i get same error. So, I have to restart web server to make it work again.
As per my investigation I get error in Connection.ExecuteOperation method at code : _networkStream.Flush();
Please have a look at the issue.
Thanks
OBaseRecord can be used in model classes and contains ORID field and method which return ODocument representation of its properties.
I'm currently using the newest update of both orient-.net driver and oriented, When I'm using the orient console, the driver will be stuck in a forever loop caused by com.orientechnologies.common.concur.lock.OLockException.
Please see the picture attached
I suspect the driver catch the exception and try to reestablish the connect again and again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.