digitalmars.D.learn - What is PostgreSQL driver is most stable?
- Suliman (6/6) Mar 14 2017 I need to develop App that should work on Linux and Windows. It
- Daniel Kozak via Digitalmars-d-learn (2/8) Mar 14 2017 ddbc works fine for me
- Paolo Invernizzi (9/16) Mar 14 2017 I'm using ddb [1], a full-D implementation of the PostgreSQL
- Suliman (2/19) Mar 14 2017 Does it work fine on Linux with x64 Postgres?
- Paolo Invernizzi (4/20) Mar 14 2017 Yes
- Dsby (3/24) Mar 15 2017 We used dpq.
- Paolo Invernizzi (7/34) Mar 15 2017 I'm curious: ddb does not support yet arbitrary precision numbers
- denizzzka (3/5) Mar 18 2017 Does Dlang supports them?
- Jacob Carlborg (4/5) Mar 16 2017 I've tested it on macOS and Linux 64bit. Works great.
- Daniel Kozak via Digitalmars-d-learn (2/11) Mar 14 2017 s/ddbc/ddb/
- Suliman (4/18) Mar 15 2017 Am I rightn understand that DBRow! is allow to get only single
- Paolo Invernizzi (9/28) Mar 15 2017 The retrieval of records is done via the execution of a
- Suliman (2/11) Mar 15 2017 Could you give an example when it's better to use DBRow and where
- Jacob Carlborg (34/36) Mar 17 2017 Use PGCommand and call "executeQuery" to get back a result set that is
I need to develop App that should work on Linux and Windows. It need PostgreSQL driver. I tried Vadim's ddbc for PostgreSQL but it's fail on x64 version of PostgreSQL and possible will not on x64 PG on Linux (I can't test it now). Could anybody advice me good driver without problems? I seen some pg-wrapers on code.dlang.ru, but do not have test all of them.
Mar 14 2017
Dne 14.3.2017 v 14:13 Suliman via Digitalmars-d-learn napsal(a):I need to develop App that should work on Linux and Windows. It need PostgreSQL driver. I tried Vadim's ddbc for PostgreSQL but it's fail on x64 version of PostgreSQL and possible will not on x64 PG on Linux (I can't test it now). Could anybody advice me good driver without problems? I seen some pg-wrapers on code.dlang.ru, but do not have test all of them.ddbc works fine for me
Mar 14 2017
On Tuesday, 14 March 2017 at 13:13:31 UTC, Suliman wrote:I need to develop App that should work on Linux and Windows. It need PostgreSQL driver. I tried Vadim's ddbc for PostgreSQL but it's fail on x64 version of PostgreSQL and possible will not on x64 PG on Linux (I can't test it now). Could anybody advice me good driver without problems? I seen some pg-wrapers on code.dlang.ru, but do not have test all of them.I'm using ddb [1], a full-D implementation of the PostgreSQL protocol. Not everything it's in place, but it does its works, and the codebase is pretty simple, so it's not difficult to contribute if you need to add some feature that's missing for your use case. [1] https://github.com/pszturmaj/ddb --- Paolo
Mar 14 2017
On Tuesday, 14 March 2017 at 13:21:39 UTC, Paolo Invernizzi wrote:On Tuesday, 14 March 2017 at 13:13:31 UTC, Suliman wrote:Does it work fine on Linux with x64 Postgres?I need to develop App that should work on Linux and Windows. It need PostgreSQL driver. I tried Vadim's ddbc for PostgreSQL but it's fail on x64 version of PostgreSQL and possible will not on x64 PG on Linux (I can't test it now). Could anybody advice me good driver without problems? I seen some pg-wrapers on code.dlang.ru, but do not have test all of them.I'm using ddb [1], a full-D implementation of the PostgreSQL protocol. Not everything it's in place, but it does its works, and the codebase is pretty simple, so it's not difficult to contribute if you need to add some feature that's missing for your use case. [1] https://github.com/pszturmaj/ddb --- Paolo
Mar 14 2017
On Tuesday, 14 March 2017 at 13:32:31 UTC, Suliman wrote:On Tuesday, 14 March 2017 at 13:21:39 UTC, Paolo Invernizzi wrote:Yes --- PaoloOn Tuesday, 14 March 2017 at 13:13:31 UTC, Suliman wrote:Does it work fine on Linux with x64 Postgres?[...]I'm using ddb [1], a full-D implementation of the PostgreSQL protocol. Not everything it's in place, but it does its works, and the codebase is pretty simple, so it's not difficult to contribute if you need to add some feature that's missing for your use case. [1] https://github.com/pszturmaj/ddb --- Paolo
Mar 14 2017
On Tuesday, 14 March 2017 at 16:24:31 UTC, Paolo Invernizzi wrote:On Tuesday, 14 March 2017 at 13:32:31 UTC, Suliman wrote:We used dpq. http://code.dlang.org/packages/dpqOn Tuesday, 14 March 2017 at 13:21:39 UTC, Paolo Invernizzi wrote:Yes --- PaoloOn Tuesday, 14 March 2017 at 13:13:31 UTC, Suliman wrote:Does it work fine on Linux with x64 Postgres?[...]I'm using ddb [1], a full-D implementation of the PostgreSQL protocol. Not everything it's in place, but it does its works, and the codebase is pretty simple, so it's not difficult to contribute if you need to add some feature that's missing for your use case. [1] https://github.com/pszturmaj/ddb --- Paolo
Mar 15 2017
On Wednesday, 15 March 2017 at 08:50:11 UTC, Dsby wrote:On Tuesday, 14 March 2017 at 16:24:31 UTC, Paolo Invernizzi wrote:I'm curious: ddb does not support yet arbitrary precision numbers [1], does dpq support them? Thanks, Paolo [1] https://www.postgresql.org/docs/9.5/static/datatype-numeric.html#DATATYPE-NUMERIC-DECIMALOn Tuesday, 14 March 2017 at 13:32:31 UTC, Suliman wrote:We used dpq. http://code.dlang.org/packages/dpqOn Tuesday, 14 March 2017 at 13:21:39 UTC, Paolo Invernizzi wrote:Yes --- PaoloOn Tuesday, 14 March 2017 at 13:13:31 UTC, Suliman wrote:Does it work fine on Linux with x64 Postgres?[...]I'm using ddb [1], a full-D implementation of the PostgreSQL protocol. Not everything it's in place, but it does its works, and the codebase is pretty simple, so it's not difficult to contribute if you need to add some feature that's missing for your use case. [1] https://github.com/pszturmaj/ddb --- Paolo
Mar 15 2017
On Wednesday, 15 March 2017 at 08:54:59 UTC, Paolo Invernizzi wrote:I'm curious: ddb does not support yet arbitrary precision numbers [1], does dpq support them?Does Dlang supports them?
Mar 18 2017
On 2017-03-14 14:32, Suliman wrote:Does it work fine on Linux with x64 Postgres?I've tested it on macOS and Linux 64bit. Works great. -- /Jacob Carlborg
Mar 16 2017
Dne 14.3.2017 v 14:21 Daniel Kozak napsal(a):Dne 14.3.2017 v 14:13 Suliman via Digitalmars-d-learn napsal(a):s/ddbc/ddb/I need to develop App that should work on Linux and Windows. It need PostgreSQL driver. I tried Vadim's ddbc for PostgreSQL but it's fail on x64 version of PostgreSQL and possible will not on x64 PG on Linux (I can't test it now). Could anybody advice me good driver without problems? I seen some pg-wrapers on code.dlang.ru, but do not have test all of them.ddbc works fine for me
Mar 14 2017
On Tuesday, 14 March 2017 at 13:36:04 UTC, Daniel Kozak wrote:Dne 14.3.2017 v 14:21 Daniel Kozak napsal(a):Am I rightn understand that DBRow! is allow to get only single row, and if I need array of rows I need to use foreach? If I am wrong could you provide an example please.Dne 14.3.2017 v 14:13 Suliman via Digitalmars-d-learn napsal(a):s/ddbc/ddb/I need to develop App that should work on Linux and Windows. It need PostgreSQL driver. I tried Vadim's ddbc for PostgreSQL but it's fail on x64 version of PostgreSQL and possible will not on x64 PG on Linux (I can't test it now). Could anybody advice me good driver without problems? I seen some pg-wrapers on code.dlang.ru, but do not have test all of them.ddbc works fine for me
Mar 15 2017
On Wednesday, 15 March 2017 at 09:18:16 UTC, Suliman wrote:On Tuesday, 14 March 2017 at 13:36:04 UTC, Daniel Kozak wrote:The retrieval of records is done via the execution of a (prepared) sql query, that returns a range object (PGResultSet), and the element of that range is the DBRow, in one of its form. So, basically, the elements are retrieved on demand while you popFront that range, leveraging what the PostgreSQL stream protocol provide. --- PaoloDne 14.3.2017 v 14:21 Daniel Kozak napsal(a):Am I rightn understand that DBRow! is allow to get only single row, and if I need array of rows I need to use foreach? If I am wrong could you provide an example please.Dne 14.3.2017 v 14:13 Suliman via Digitalmars-d-learn napsal(a):s/ddbc/ddb/I need to develop App that should work on Linux and Windows. It need PostgreSQL driver. I tried Vadim's ddbc for PostgreSQL but it's fail on x64 version of PostgreSQL and possible will not on x64 PG on Linux (I can't test it now). Could anybody advice me good driver without problems? I seen some pg-wrapers on code.dlang.ru, but do not have test all of them.ddbc works fine for me
Mar 15 2017
The retrieval of records is done via the execution of a (prepared) sql query, that returns a range object (PGResultSet), and the element of that range is the DBRow, in one of its form. So, basically, the elements are retrieved on demand while you popFront that range, leveraging what the PostgreSQL stream protocol provide. --- PaoloCould you give an example when it's better to use DBRow and where to get data in structure?
Mar 15 2017
On 2017-03-15 15:08, Suliman wrote:Could you give an example when it's better to use DBRow and where to get data in structure?Use PGCommand and call "executeQuery" to get back a result set that is iteratable: auto query = "SELECT * FROM foos" auto cmd = new PGCommand(connection, query); auto resultSet = cmd.executeQuery!(string, int); // these types are the column types foreach (row ; resultSet) { auto name = row["name"]; auto bar = row[1]; // use the column name or index to get the value from a row } resultSet.close(); // the result set needs to be closed to be able to execute additional queries You can also directly create structs out of the rows: struct Foo { string name; string bar; } auto resultSet = cmd.executeQuery!(typeof(Foo.tupleof)); foreach (row ; resultSet) { auto foo = Foo(row[0 .. Foo.tupleof.length]); assert(foo.name == row["name"]); } executeQuery - for returning a set of rows executeRow - for returning a single executeNonQuery - for executing a query without any result See the examples for more information [1]. [1] https://github.com/pszturmaj/ddb/blob/master/examples/basic.d -- /Jacob Carlborg
Mar 17 2017