--- Begin Message ---Nice, I just added convenience methods #listDatabases #listSchemas and #listTablesInSchema: to P3Client so you should be able to make a real browser, connection >> schemas >> tables >> contents (listDatabases is not so useful since you can only connect to 1 database at a time).> On 6 Jan 2019, at 00:01, Tudor Girba <tu...@tudorgirba.com> wrote: > > And with a little more code, we now have a dedicated Playground form snippet > that opens the database connection without requiring any Pharo code. > > <gt4p3-snippet.png> > > Cheers, > Doru > > >> On Jan 5, 2019, at 12:02 AM, Tudor Girba <tu...@tudorgirba.com> wrote: >> >> You can now query a Postgres database from the new GT. The initial code is >> available here: >> https://github.com/feenkcom/gt4p3 >> >> It currently looks like this: >> <gt-inspector-p3-query.png> >> >> Cheers, >> Doru >> >> >> >>> On Dec 31, 2018, at 12:33 PM, Sven Van Caekenberghe <s...@stfx.eu> wrote: >>> >>> Hi, >>> >>> I created a new release of P3, the modern, lean and mean PostgreSQL client >>> for Pharo. >>> >>> https://github.com/svenvc/P3 >>> >>> Version 1.1 contains the following changes: >>> >>> - added support for Postgres Extended Query protocol (P3PreparedStatement) >>> (thx Jan @jvdsandt) >>> - added support for reading array type values (currently INTEGER[] FLOAT[] >>> BOOLEAN[] TEXT[] VARCHAR[]) >>> - added P3-Tests package and moved all tests there >>> - more comments >>> - more unit tests >>> >>> https://github.com/svenvc/P3/releases/tag/v1.1 >>> >>> >>> Especially Jan's contribution adds a lot of functionality: the ability to >>> work with prepared statements. >>> >>> Here is an example doing a batch insert of 100 records (which is more >>> efficient). >>> >>> | client statement | >>> >>> client := P3Client url: 'psql://sven@localhost'. >>> >>> client execute: 'DROP TABLE IF EXISTS table1'. >>> client execute: 'CREATE TABLE table1 (id SERIAL PRIMARY KEY, created_at >>> TIMESTAMP DEFAULT NOW(), name TEXT)'. >>> >>> statement := client prepare: 'INSERT INTO table1 (name) VALUES ($1)'. >>> statement executeBatch: ((1 to: 100) collect: [ :index | Array with: ('Text >>> #', index printString) ]). >>> >>> client query: 'SELECT * FROM table1'. >>> client execute: 'DROP TABLE table1'. >>> >>> statement close. >>> client close. >>> >>> >>> Season's Greetings to you all. >>> >>> Sven >>> >>> >>> -- >>> Sven Van Caekenberghe >>> Proudly supporting Pharo >>> http://pharo.org >>> http://association.pharo.org >>> http://consortium.pharo.org >>> >>> >>> >>> >> >> -- >> www.feenk.com >> >> "What is more important: To be happy, or to make happy?" >> > > -- > www.feenk.com > > "Quality cannot be an afterthought." >
--- End Message ---
Re: [Pharo-users] [ANN] P3 version 1.1
Sven Van Caekenberghe via Pharo-users Sun, 06 Jan 2019 12:27:52 -0800
- [Pharo-users] [ANN] P3 version 1.1 Sven Van Caekenberghe
- Re: [Pharo-users] [ANN] P3 vers... Ben Coman
- Re: [Pharo-users] [ANN] P3 ... Sven Van Caekenberghe via Pharo-users
- Re: [Pharo-users] [ANN] P3 vers... Tudor Girba via Pharo-users
- Re: [Pharo-users] [ANN] P3 ... Guillermo Polito via Pharo-users
- Re: [Pharo-users] [ANN] P3 vers... Tudor Girba
- Re: [Pharo-users] [ANN] P3 ... Ben Coman
- Re: [Pharo-users] [ANN] P3 ... Sven Van Caekenberghe via Pharo-users
- Re: [Pharo-users] [ANN] P3 ... Tudor Girba
- Re: [Pharo-users] [ANN]... Sven Van Caekenberghe via Pharo-users
- Re: [Pharo-users] [... Tudor Girba via Pharo-users
- Re: [Pharo-users] [... Sven Van Caekenberghe
- Re: [Pharo-use... Tudor Girba