Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 07 2019 20:42
    samsonradu added as member
  • Jan 07 2019 20:42
    zekus added as member
  • Jun 26 2015 17:44
    dmarcelino commented on d2143ed
  • Jun 26 2015 16:57

    phpnode on master

    Update README.md (compare)

  • Jun 25 2015 13:33
    iofjuupasli commented #192
  • Jun 25 2015 02:45
    usandfriends opened #334
  • Jun 19 2015 09:09
    phpnode closed #5
  • Jun 19 2015 09:09
    phpnode commented #5
  • Jun 19 2015 09:09
    phpnode closed #44
  • Jun 19 2015 09:09
    phpnode commented #44
  • Jun 19 2015 09:09
    phpnode closed #280
  • Jun 19 2015 09:09
    phpnode commented #280
  • Jun 19 2015 09:09
    phpnode closed #281
  • Jun 19 2015 09:09
    phpnode commented #281
  • Jun 19 2015 09:08
    phpnode closed #260
  • Jun 19 2015 09:08
    phpnode commented #260
  • Jun 19 2015 09:08
    phpnode closed #271
  • Jun 19 2015 09:08
    phpnode commented #271
  • Jun 19 2015 09:08
    phpnode closed #275
  • Jun 19 2015 09:08
    phpnode commented #275
Khánh Trần
@rualatngua
is there any smarter way than replace old @rid by new @rid?
Hoàng Anh
@hoanganh200870
I think we need to replace old @rid by new @rid on E and update in, out properties on V. First thing very easy, but the second, I don't have a effective way
Charles Pick
@phpnode
@hoanganh200870 seen MOVE VERTEX ?
Hoàng Anh
@hoanganh200870
Thanks @phpnode. But, according to OrientDb's documentation (http://orientdb.com/docs/2.0/orientdb.wiki/SQL-Move-Vertex.html), I think it just move vertex to another location with optional to merge data to this vertex.
Khánh Trần
@rualatngua
hi all
codemix/oriento#276
I have this issue too
Nauman
@nomi-ramzan
Hi all. how can I use OR, AND operators in oriento for SELECT/UPDATE/DELETE ?
Charles Pick
@phpnode
@nomi-ramzan they have the exact same parameters as .where, so you can write e.g. db.select().from('OUser').where({name: "admin"}).or({name: "writer"}).all()
Nauman
@nomi-ramzan
@phpnode and what about multivalues ? Like or({id:[1,2,3,4]}) ?
ahtasham637
@ahtasham637

@phpnode how to use db.createFn to retrieve data from db? I tried this:

db.createFn("retreiveUser", function() {
      return db.query('select from User');
    })
    .then(function (data) {
          console.log(data);
    }).catch(function(err){
                console.log(err);
    });

But it isn't working

chiavelli
@chiavelli
I'm curious what is the proper way to query whether an edge exists between two vertices? There doesn't appear to be an example of this type of query in the examples.
Is that because it isn't the proper way to go about getting this info?
André Marques
@dehbmarques
@chiavelli to find all edges between to vertices you can do something like this:
/* find all edges between #24:0 and #16:4 */
select from (
  select expand(bothE()) from #24:0
) where #16:4 in [in, out]
chiavelli
@chiavelli
@dehbmarques Thanks, that's exactly what I was looking for
James Ross
@flyingrobots
@phpnode If you connect to a database, then immediately close the connection, it will leave a socket connection open. Specifically, in lib/transport/binary/index.js, BinaryTransport.prototype.send, if there isn't a sessionId, it will connect then send the message. In this case, the message is "close", but after the message is sent, it leaves the socket connection open... So it seems like binary connections are never closed. Is this known/intentional? Here's the code to reproduce: var db = oriento({/*...*/}).use({/*...*/}); db.close();
If you enable debug logging you'll see that a connection is left open.
As a consequence, if your application opens/closes a connection more than 1000 times, you'll have 1000 connections open to your database server, which can max it out. You can observe these connections using OrientDB's studio tool.
James Ross
@flyingrobots
OK, so, I'm sorry about that - I've just realized that db.close() isn't enough to close the socket connection opened to the server. oriento() returns a connection that you must also close. Furthermore, db.close() returns a Promise that you must wait on before closing the server's connection. Here's an example of how it should be done:
var serverOpts = {/*...*/};
var dbOpts = {/*...*/};
var server = oriento(serverOpts);
var db = server.use(dbOpts);
db.close().then(function() {
  return server.close();
});
James Ross
@flyingrobots
I had tried db.close(); server.close(); and since I wasn't chaining these Promises, the server's socket connection would close, then, db.close() would attempt to send the close message to the server, causing the socket connection to open back up. Since I hadn't chained these promises together properly, it appeared as if the socket connection had not closed.
James Ross
@flyingrobots
I'm trying to use transactions now... I'm following the example and I've noticed that when the transaction gets rolled back, the Promise is resolved and the result passed to it is a record with a negative @rid, which indicates that it is a temporary record. Why isn't the Promise rejected in this case? If the transaction fails, shouldn't the Promise be rejected? Am I supposed to check the @rid value myself to determine whether or not my transaction was successful?
James Ross
@flyingrobots
OK so after looking into it - transactions + binary transport appears to be broken due to an OrientDB bug - perhaps in the latest release candidate, 2.1-rc3, it has been fixed... I will try tomorrow and report back, in case anybody else cares
James Ross
@flyingrobots
Just installed 2.1-rc3 and tried out transactions... I haven't done extensive testing, but after running a few simple tests they appear to work correctly now. I had been running OrientDB 2.0.8 prior to this version. In my simple tests, failed transactions cause Promises to be rejected properly, and db ops appear to be rolled back. So that is good news.
Dário
@dmarcelino
Thanks for sharing @flyingrobots!
James Ross
@flyingrobots
My pleasure :-)
Nauman
@nomi-ramzan
Hi all ! is there any way to get xml output from orientdb instead of json via http ?
ycxq
@ycxq
Hi all! Is anyone successful in escaping \r\n in strings and pass it to orientdb through oriento?
ycxq
@ycxq
This message was deleted
I think it does not work in transactions:
db.let("x", function (s) {
    s.insert().into("test").set({name: 'line1\r\nline2'});
});
Nauman
@nomi-ramzan
Hi all ! how can I update embedded field using orientjs ?
Charles Pick
@phpnode
@nomi-ramzan I'm sure the orientjs maintainers will be able to help you, they're offering support
Nauman
@nomi-ramzan
@phpnode how can I update embedded in oriento ?
Dustin Deus
@StarpTech
@nomi-ramzan orientjs is a clone of orientdb
Andrew Herrault
@Ndrou
@nomi-ramzan You can update your embedded as
db.update('YourClass') // Your class
     .set('yourfield = ' + JSON.stringify(yourEmbeddedDatas)) // The embedded param
     .where('true = true') // Your condition
     .all()
     (...) // then the promise return
@nomi-ramzan But prefer the syntax below due to this bug : orientechnologies/orientdb#3449
 var sql = [
                'UPDATE',
                'YourClass',
                'CONTENT ' + JSON.stringify(yourEmbeddedDatas),
            ].join(" ");

            db.query(sql)
Nauman
@nomi-ramzan
@StarpTech @Ndrou Thank you. its working now.
How can I fetch all IN edges from a Vertex using fetchplan ?
Nauman
@nomi-ramzan
Hi all ! How can I use limited fetchplan like fetchplan:in:2 But on second level i also want to use selected properties something like this fetchplan:in:2(prop1, prop2) ?
Nauman
@nomi-ramzan
This message was deleted
Dustin Deus
@StarpTech
Different projection on levels is not supported you can just setting up the projection for all. Look at the link above for the correct Syntax.
Benjamin Stein
@stein321
Hi, I'm just trying to create my first migration
when I run "oriento migrate create new_migration" I get: .nvm/v0.12.7/lib/node_modules/oriento/node_modules/bluebird/js/main/promise.js:673
throw e;
^
Error: ENOENT, open '/Users/stein/Projects/npmtest/migrations/m20150805_205813_new_m.js'
at Error (native)
has anyone seen that before?
Andrew Herrault
@Ndrou
Check your path and your rights, this error is related to an file access problem or file rights problem
Benjamin Stein
@stein321
yup! turns out if the migrations directory does not already exist, it breaks
thanks @Ndrou
john ervine
@johnboy14
hi folks. Is there any good Clojure libraries that support the database?
java or gremlin based?
nodecraic
@webworkio
hey, if anyone has any remote remote , designer, DevOps or Sysadmin jobs they can post them at http://webwork.io