I don't understand how to use it, can you post an example?
I have tried everything and have gotten it to work under circumstances
I'm not sure of. However it doesn't work now.
(ns progs.netflix.parsing
(:require (progs.netflix [pg :as pg]))
(:import (java.sql Date)))
(load-file "C:/cloj
and user.clj function wasn't avilable without importing it when I try
to access them if I put a file ina namespace.
On Jan 7, 8:27 pm, "Stephen C. Gilardi" wrote:
> On Jan 7, 2009, at 12:11 PM, ssecorp wrote:
>
>
>
> > This was going to be a question but
I tried to use connection in internal to get resultSetMetadata but I
never succeeded with it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.
(defn inse []
(sql/with-connection db
(sql/transaction
(insert-rows :r [[1 2 "date '2008-12-03'" 3]])))
nil)
I have tried all kinds of variations. it works perfectly with another
table, like (int,int,int,int) and passing [1,2,3,4]
so it is the type of column 3 that is the problem.
"
This was going to be a question but I solved it before I finished the
post :)
Figured I might post the solution then, hopefully it will help someone
else.
(import '(java.sql Connection DriverManager ResultSet SQLException
Statement ResultSetMetaData))
(import '(org.postgresql
On Jan 6, 9:20 pm, "Stephen C. Gilardi" wrote:
> On Jan 6, 2009, at 2:27 PM, ssecorp wrote:
>
> > On Jan 6, 8:12 pm, ssecorp wrote:
> >> CREATE TABLE foo (
> >> col1 INTEGER NOT NULL,
> >> col2 VARCHAR(32) NOT NULL,
> >
On Jan 6, 8:12 pm, ssecorp wrote:
> CREATE TABLE foo (
> col1 INTEGER NOT NULL,
> col2 VARCHAR(32) NOT NULL,
> col3 DATE NOT NULL,
> PRIMARY KEY (col1, col2)
> );
>
> how would I set primary key if it is a combination of 2 keys?
also how would I set a ke
CREATE TABLE foo (
col1 INTEGER NOT NULL,
col2 VARCHAR(32) NOT NULL,
col3 DATE NOT NULL,
PRIMARY KEY (col1, col2)
);
how would I set primary key if it is a combination of 2 keys?
--~--~-~--~~~---~--~~
You received this message because you are subscribed
(def db {:classname "org.apache.derby.jdbc.EmbeddedDriver"
:subprotocol "derby"
:subname "C:/clojure/progs/netflix/netflix.db"
:create true})
would I add this to set username and password?
;; :user "ninja"
;; :password "kalle"})
(defn create-reviews-table
I had some trouble understanding this at first too.
"Here I want to dispatch on the class of the first argument xs. "
on the first aargument, ie xs, or on the first argument of xs?
This should work:
(defmulti group
(fn [xs n]
(class xs)))
(defmulti group
(fn [xs n]
(class (first xs
split is working fine, returns the parts on both sides of the
delimiter.
but for some reason splitall doesnt, it just does what split does.
(also, what si the best way to deal with strings in clojure, java-
strings?)
(defn split [str delim]
(loop [s str acc nil]
(cond
(= s
If I want to add something to boot.clj so I always have it available.
lets say h and t for head/first tail/rest (yes i find them annoyingly
long).
it doesn't work just adding something to the file, do i have to add it
somewhere else too? recompile something?
--~--~-~--~~---
So this string-splitting function works but it doesn't look very
aesthetic and returns a list of lists of \char.
I know I can do (map str list) to turn the chars(?) into strings again
but how do I append them?
And can it be made to look nicer? I don't find it very readable.
(defn split [str del
13 matches
Mail list logo