Coder Social home page Coder Social logo

clj-orient's People

Contributors

eduardoejp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

clj-orient's Issues

problems with IN / in? and args maps

The following work fine:

(sql-query "SELECT FROM myclass
            WHERE name IN [\"string1\", \"string2\"]")
(clj-query '{:from myclass
             :where [(in? name ["string1" "string2"])]})

But the following variants using "args maps" are causing an exception (see below). I've tried poking around in the various ...->sql and query-related functions, but haven't found the culprit yet. Perhaps I'm not using IN/in? correctly with respect to args maps?

I'm running with Clojure 1.4.0, OrientDB 1.1.0 and a clj-orient snapshot based on your master branch; and I'm connecting to OrientDB remotely instead of embedding it locally.

(sql-query "SELECT FROM myclass
            WHERE name IN :names"
           {:names ["string1" "string2"]})
(clj-query '{:from myclass
             :where [(in? name ?names)]}
            {:names ["string1" "string2"]})

Both result in:

com.orientechnologies.orient.core.sql.filter.OSQLFilterItemParameter cannot be cast to java.util.List
  [Thrown class java.lang.ClassCastException]

Restarts:
 0: [QUIT] Quit to the SLIME top level

Backtrace:
  0:                      (Unknown Source) sun.reflect.NativeConstructorAccessorImpl.newInstance0
  1: NativeConstructorAccessorImpl.java:39 sun.reflect.NativeConstructorAccessorImpl.newInstance
  2: DelegatingConstructorAccessorImpl.java:27 sun.reflect.DelegatingConstructorAccessorImpl.newInstance
  3:                  Constructor.java:513 java.lang.reflect.Constructor.newInstance
  4:               OChannelBinary.java:429 com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.createException
  5:               OChannelBinary.java:382 com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary.handleStatus
  6:         OChannelBinaryAsynch.java:145 com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse
  7:          OChannelBinaryAsynch.java:59 com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynch.beginResponse
  8:              OStorageRemote.java:1556 com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse
  9:               OStorageRemote.java:727 com.orientechnologies.orient.client.remote.OStorageRemote.command
 10:         OStorageRemoteThread.java:191 com.orientechnologies.orient.client.remote.OStorageRemoteThread.command
 11:                     OSQLQuery.java:68 com.orientechnologies.orient.core.sql.query.OSQLQuery.run
 12:                OSQLSynchQuery.java:78 com.orientechnologies.orient.core.sql.query.OSQLSynchQuery.run
 13:                OQueryAbstract.java:30 com.orientechnologies.orient.core.query.OQueryAbstract.execute
 14:      ODatabaseRecordAbstract.java:380 com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.query
 15: ODatabaseRecordWrapperAbstract.java:177 com.orientechnologies.orient.core.db.ODatabaseRecordWrapperAbstract.query
 16:                         query.clj:146 clj-orient.query/sql-query
 17:                       RestFn.java:423 clojure.lang.RestFn.invoke
 18:                        hyper_ua.clj:1 com.projexsys.hyper-ua.data/eval6899
 19:                    Compiler.java:6511 clojure.lang.Compiler.eval
 20:                    Compiler.java:6477 clojure.lang.Compiler.eval
 21:                         core.clj:2797 clojure.core/eval
 22:                          core.clj:534 swank.core/eval5643[fn]
 23:                      MultiFn.java:163 clojure.lang.MultiFn.invoke
 24:                          basic.clj:55 swank.commands.basic/eval-region
 25:                          basic.clj:45 swank.commands.basic/eval-region
 26:                          basic.clj:79 swank.commands.basic/eval5838[fn]
 27:                          Var.java:415 clojure.lang.Var.invoke
 28:                      (Unknown Source) com.projexsys.hyper-ua.data/eval6897
 29:                    Compiler.java:6511 clojure.lang.Compiler.eval
 30:                    Compiler.java:6477 clojure.lang.Compiler.eval
 31:                         core.clj:2797 clojure.core/eval
 32:                          core.clj:102 swank.core/eval-in-emacs-package
 33:                          core.clj:258 swank.core/eval-for-emacs
 34:                          Var.java:423 clojure.lang.Var.invoke
 35:                          AFn.java:167 clojure.lang.AFn.applyToHelper
 36:                          Var.java:532 clojure.lang.Var.applyTo
 37:                          core.clj:601 clojure.core/apply
 38:                          core.clj:109 swank.core/eval-from-control
 39:                          core.clj:114 swank.core/eval-loop
 40:                          core.clj:343 swank.core/spawn-repl-thread[fn]
 41:                          AFn.java:159 clojure.lang.AFn.applyToHelper
 42:                          AFn.java:151 clojure.lang.AFn.applyTo
 43:                          core.clj:601 clojure.core/apply
 44:                          core.clj:340 swank.core/spawn-repl-thread[fn]
 45:                       RestFn.java:397 clojure.lang.RestFn.invoke
 46:                           AFn.java:24 clojure.lang.AFn.run
 47:                       Thread.java:680 java.lang.Thread.run

Nested Arrays and List Don't Get Saved.

Can't store embedded data like we usually present in JSON:

This:
(db/save! (db/document :user [{:foo 1}]))

or:
(db/save! (db/document :user {:foo {:bar [1]}}))

Throws an exception:
Can't serialize the object since it's not implements the OSerializableStream interface.

Cannot connect to remote

Every time I try to connect I get:

com.orientechnologies.common.io.OIOException: Cannot connect to any configured remote nodes: 127.0.0.1:2424

server log:

2014-01-30 16:24:55:113 INFO /127.0.0.1:37758 - Connected [OChannelBinaryServer]
2014-01-30 16:24:55:114 INFO /127.0.0.1:37758 - Writing short (2 bytes): 19 [OChannelBinaryServer]
2014-01-30 16:24:55:114 INFO /127.0.0.1:37758 - Flush [OChannelBinaryServer]
2014-01-30 16:24:55:115 INFO /127.0.0.1:37758 - Reading byte (1 byte)... [OChannelBinaryServer]
2014-01-30 16:24:55:121 INFO /127.0.0.1:37758 - Flush [OChannelBinaryServer]
2014-01-30 16:24:55:122 INFO /127.0.0.1:37758 - Closing socket... [OChannelBinaryServer]

it looks like it's getting through but then the connection gets dropped.

OrientDB version 1.6.4

Tried with both 0.5.0 and 0.6.0-SNAPSHOT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.