Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 5 commits
  • 8 files changed
  • 0 comments
  • 1 contributor
20  Makefile
... ...
@@ -1,5 +1,19 @@
1  
-all:
2  
-	(cd src; make)
  1
+REBAR=`which rebar || ./rebar`
3 2
 
  3
+all: deps compile
  4
+
  5
+deps:
  6
+	@$(REBAR) get-deps
  7
+compile:
  8
+	@$(REBAR) compile
  9
+test:
  10
+	@$(REBAR) skip_deps=true eunit
4 11
 clean:
5  
-	(cd src; make clean)
  12
+	@$(REBAR) clean
  13
+check:
  14
+	dialyzer --src -r src -I ebin \
  15
+	-Wunmatched_returns \
  16
+	-Werror_handling \
  17
+	-Wrace_conditions \
  18
+	-Wbehaviours \
  19
+	-Wunderspecs
4  README.md
Source Rendered
@@ -21,7 +21,7 @@ USAGE
21 21
 	$ erl -pa emongo/ebin mongosql/ebin
22 22
 
23 23
 	> application:start(emongo).
24  
-	> {ok, Pool} = mongosql_conn:start("127.0.0.1", 27017, "test1").
  24
+	> {ok, Pool} = mongosql_conn:start({"127.0.0.1", 27017}, "test1").
25 25
 	> mongosql_conn:fetch(Pool, "insert into tbl1 col1, col2 values ('string', 1);", false).
26 26
 	{updated,1}
27 27
 	> mongosql_conn:fetch(Pool, "select count(*) from tbl1;", false). 
@@ -32,4 +32,4 @@ USAGE
32 32
 	{updated,1}
33 33
 	> mongosql_conn:fetch(Pool, "select count(*) from tbl1;", false).        
34 34
 	{selected,["count(*)"],[{"0"}]}
35  
-	> mongosql_conn:stop(Pool).
  35
+	> mongosql_conn:stop(Pool).
6  debian/changelog
... ...
@@ -1,3 +1,9 @@
  1
+mongosql (0.0.3-1) unstable; urgency=low
  2
+
  3
+  * emongo 0.2.3 with Replica Set support
  4
+
  5
+ -- Oleg Smirnov <oleg.smirnov@gmail.com>  Wed, 11 Apr 2011 19:56:11 +0300
  6
+
1 7
 mongosql (0.0.2-1) unstable; urgency=low
2 8
 
3 9
   * Fixed bug in count(*) return.
2  debian/rules
... ...
@@ -1,7 +1,7 @@
1 1
 #!/usr/bin/make -f
2 2
 
3 3
 PKG_NAME=mongosql
4  
-VERSION=0.0.2
  4
+VERSION=0.0.3
5 5
 DEB_DESTDIR=$(CURDIR)/debian/$(PKG_NAME)
6 6
 LIB_DIR=$(DEB_DESTDIR)/usr/lib/erlang/lib/$(PKG_NAME)-$(VERSION)
7 7
 
6  ebin/mongosql.app
... ...
@@ -1,10 +1,12 @@
1 1
 {application, mongosql,
2 2
  [{description, "MongoSQL"},
3  
-  {vsn, "0.0.2"},
  3
+  {vsn, "0.0.3"},
4 4
   {modules, [mongosql_conn,
5 5
              mongosql_sem,
6 6
              sql92_parser,
7  
-             sql92_scan]},
  7
+             sql92_scan,
  8
+             mongosql_cli,
  9
+             mongosql_join]},
8 10
   {registered,[]},
9 11
   {applications, [kernel,stdlib]},
10 12
   {env, []}]}.
17  src/Makefile
... ...
@@ -1,17 +0,0 @@
1  
-OUTDIR = ../ebin
2  
-SOURCES = $(wildcard *.erl) sql92_parser.erl sql92_scan.erl
3  
-BEAMS = $(addprefix $(OUTDIR)/,$(SOURCES:.erl=.beam))
4  
-
5  
-all:    $(BEAMS)
6  
-
7  
-$(OUTDIR)/%.beam: %.erl
8  
-	erlc -W $(EFLAGS) -o $(OUTDIR) $<
9  
-
10  
-sql92_parser.erl: sql92_parser.yrl
11  
-	erlc -W $<
12  
-
13  
-sql92_scan.erl: sql92_scan.xrl
14  
-	erlc -W $<
15  
-
16  
-clean:
17  
-	-rm -f $(BEAMS) sql92_parser.erl sql92_scan.erl
8  src/mongosql_conn.erl
@@ -2,7 +2,7 @@
2 2
 %% @doc MongoSQL connection
3 3
 -module(mongosql_conn).
4 4
 
5  
--export([start/3, start/5, fetch/3, stop/1]).
  5
+-export([start/3, fetch/3, stop/1]).
6 6
 
7 7
 -define(POOL_SIZE, 3).
8 8
 
@@ -108,10 +108,10 @@ bin_to_str(S) -> S.
108 108
 
109 109
 %% @doc Connect to database
110 110
 start(Host, Port, Database) ->
111  
-    start(Host, Port, "", "", Database).
  111
+    start([{Host, Port}], Database).
112 112
 
113  
-start(Host, Port,_User,_Password, Database) ->
114  
-    emongo:add_pool(make_ref(), Host, Port, Database, ?POOL_SIZE).
  113
+start(Urls, Database) when is_list(Urls) ->
  114
+    emongo:add_pool(make_ref(), Urls, Database, ?POOL_SIZE).
115 115
 
116 116
 %% @doc Execute SQL query
117 117
 fetch(PoolId, Query, Sync) ->
1  src/mongosql_join.erl
@@ -5,6 +5,7 @@
5 5
 -module(mongosql_join).
6 6
 
7 7
 -export([natural/2, equi/3, cross/2]).
  8
+-compile([nowarn_unused_function]).
8 9
 
9 10
 -include_lib("eunit/include/eunit.hrl").
10 11
 

No commit comments for this range

Something went wrong with that request. Please try again.