RAW QUERY

58 views
Skip to first unread message

ENTR0PY

unread,
Nov 26, 2014, 11:29:24 PM11/26/14
to chica...@googlegroups.com
Does anyone know if CB can perform raw query again Mongodb?

SQL
 select * from some_table - this works with boss_db:execute(" select * from some_table").

Mongo
db.some_table.find({})  - this does not work at all

Kai Janson

unread,
Nov 27, 2014, 1:21:44 AM11/27/14
to chica...@googlegroups.com
No, boss_db cannot run a raw query against the database.  That functionality never made it into it.

Sent from my non-google-device
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/13983a7c-16dc-475a-9f3d-43500bf83e5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Welton

unread,
Nov 27, 2014, 3:43:39 AM11/27/14
to chica...@googlegroups.com
In addition to the existing boss_db:execute, I actually wrote a
find_by_sql, as well, but only created a back end for Postgres for the
latter. It's up to people using other DB's to write that
functionality for them.

On Thu, Nov 27, 2014 at 7:21 AM, Kai Janson <kot...@gmail.com> wrote:
> No, boss_db cannot run a raw query against the database. That functionality
> never made it into it.

--
David N. Welton

http://www.welton.it/davidw/

http://www.dedasys.com/

ENTR0PY

unread,
Nov 27, 2014, 10:55:41 AM11/27/14
to chica...@googlegroups.com

 Thnaks for the replies , both were quick clear and to the point.
  However; I am new to Erlang and to CB , I am not up to writing a back end just yet.

Kai Janson

unread,
Nov 27, 2014, 11:05:27 AM11/27/14
to chica...@googlegroups.com
Most of the really needed database functionality has been included into the MongoDB driver and Evan did a great job in doing so.

I hardly ever had the need or desire to poke around in the not supported calls in MongoDB since it did what it was supposed to do from within the given driver.

I used MongoDB on many projects in conjunction with ChicagoBoss and I still love both.

I'll keep looking for your questions and see if I can answer them for you.

--Kai

Sent from my tricorder
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.

ENTR0PY

unread,
Nov 27, 2014, 11:10:43 AM11/27/14
to chica...@googlegroups.com
Should the conditions and comparison operators work? As before the database is MongoDB

for example should this work

 boss_db:find(person,["name","equals","John"]).



On Thursday, November 27, 2014 12:29:24 AM UTC-4, ENTR0PY wrote:

ENTR0PY

unread,
Nov 27, 2014, 11:27:11 AM11/27/14
to chica...@googlegroups.com
Hmmm, so I could simply side step boss_db and try the MongoDB driver directly!! I have had to do a bit more work when I run the raw queries, I imagine it’s the same with the MongoDB driver directly......

Thanks again............

ENTR0PY

unread,
Nov 28, 2014, 9:11:45 PM11/28/14
to chica...@googlegroups.com
commands not working

I am using the version of MongoDB that ships with CB, the below command is not working

mongo:do(safe,master,Conn,my_batabase_name_here,fun()-> mongo:find(my_collection_name_here,{}) end).




On Thursday, November 27, 2014 12:29:24 AM UTC-4, ENTR0PY wrote:

Kai Janson

unread,
Nov 29, 2014, 12:29:56 PM11/29/14
to chica...@googlegroups.com
The version that ships with ChicagoBoss is adopted to ChicagoBoss.  You should use one standalone Erlang version that's not part of the CB package.

--Kai

Sent from my tricorder
--
You received this message because you are subscribed to the Google Groups "ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss...@googlegroups.com.
Visit this group at http://groups.google.com/group/chicagoboss.

ENTR0PY

unread,
Nov 30, 2014, 2:19:39 PM11/30/14
to chica...@googlegroups.com
Ok, i give your sugestion a go.....
Reply all
Reply to author
Forward
0 new messages