bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] Update on SQL support


From: Elias Mårtenson
Subject: [Bug-apl] Update on SQL support
Date: Tue, 15 Apr 2014 00:25:28 +0800

Just an update: Postgres support almost works now. I have some issues determining the correct data type of the returned values, but once that is resolved it's time to work on the 2D array arguments.

I've changed SQL[1] (connect) to accept a left argument, being the database type. I will also make it register mnemonic functions so that you don't have to see the function numbers. Thus, once the 2D stuff is ready you'll be able to copy the content of "foo" in an SQLite database into table "bar" in a Postgres database like this:

'libsql' ⎕FX 'SQL'
dbA ← 'sqlite' SQL∆Connect '/path/to/database'
dbB ← 'postgresql' SQL∆Connect 'host=hostname.of.database.com'
result ← 'select * from foo' SQL∆Select[dbA] ⍬
'insert into bar (a,b) values (?,?)' SQL∆Exec[dbB] result
SQL∆Close dbA
SQL∆Close dbB

Are you all OK with this syntax?

Regards,
Elias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]