ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol

Showing 1-16 of 16 messages
ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Justin Donaldson 9/2/13 10:21 PM
I put together a postgres library this weekend, enjoy!

https://github.com/jdonaldson/postgrehx

It's still pretty rough, and the haxe Connection interface is not implemented completely.  I'll post some of my questions on that soon.

There's some neat things that are possible here, particularly with postgres' richer datatype spec; E.g its ability to query and return json objects.

Best,
-Justin


Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol back2dos 9/3/13 1:21 AM
Awesome!
> --
> To post to this group haxe...@googlegroups.com
> http://groups.google.com/group/haxelang?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Haxe" group.
> For more options, visit https://groups.google.com/groups/opt_out.
Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Justin Donaldson 9/4/13 10:35 PM
for sys.db.Connection, I would think quote() would simply quote a string (e.g. escaping single quotes with doubles, etc.), and escape() would escape any potentially malicious string values (quotes, new lines, backslashes, etc.).  In the std SqlLite implementation, it looks like it's the opposite.   Do I have things backwards?

Best,
-Justin
Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol FullOfCaffeine 9/5/13 10:50 AM
Very nice! I can't remember the last time I used MySQL. PostgreSQL is what I have been using and I it's rock solid. Nice to see some support here. 

What platforms are currently supported?

-- 
Marcelo

Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Eric Priou 9/5/13 11:18 AM
Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Justin Donaldson 9/5/13 1:57 PM

>
> What platforms are currently supported?

Anything that supports the basic Haxe sys module should work.  I've done quick tests on neko php and CPP.

Some platforms seem faster.  I wonder if Haxe could provide its own cpp externs within the sys module?  E.g. a compiled CPP extern used by neko...

Best,
Justin

Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Justin Donaldson 9/5/13 2:16 PM

Also worth mentioning... I believe this should all work inside of macros as well.  It could make for an interesting orm.

Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Jason O'Neil 9/5/13 4:00 PM

Nice approach...

Doing it completely in Haxe using sockets rather than wrapping ndlls or native libraries is cool, and really allows it to work cross-platform in a fairly reliable way.  Once this gets a bit more stable it will be interesting to see what is needed for it to work with Haxe's DB macros.  Mostly the macros just generate SQL statements, but until now they've only been tested against MySQL and SQLite, so supporting Postgres support may require a few changes...

Postgres support should also be possible on the Java target via the JDBC driver once Cauê merges his pull request... But a native "haxe" implementation is just so cool :)

Jason

cool

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.
Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol back2dos 9/6/13 4:37 AM
The library implements sys.db.Connection, so technically, it can work
with Haxe's DB macros already.

But there's still work to be done, especially for decoding primitives.
At the current stage, I wouldn't be surprised if things like Dates are
not correctly converted.

Regards,
Juraj
Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Jason O'Neil 9/6/13 5:51 AM
I'm aware that the DB macros have some connection specific hacks in them, especially the TableCreate class, but in a few other places as well.  At the moment I've seen these workarounds for MySQL and SQLite, so there would just have to be some testing (or thorough examination of the code) to see where these occur and where they don't.

As more connection types become available it would be worth looking to minimize these hacks, and the other thing I would like to look at is having them work with an Async connection for NodeJS.  All in good time :)



--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.

Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Cauê Waneck 9/6/13 6:07 AM

2013/9/6 Jason O'Neil <jason...@gmail.com>

I'm aware that the DB macros have some connection specific hacks in them, especially the TableCreate class, but in a few other places as well.  At the moment I've seen these workarounds for MySQL and SQLite, so there would just have to be some testing (or thorough examination of the code) to see where these occur and where they don't.

Yes. It comes into my mind specifically the TableCreate class, and the MySQL-specific way to deal with locks and LIMIT. Limit's particularly painful to deal with, unfortunately. 

As more connection types become available it would be worth looking to minimize these hacks, and the other thing I would like to look at is having them work with an Async connection for NodeJS.  All in good time :)

That'd be awesome, Jason! By the way, just came to know your ufront.db package, and that's very useful, thanks! 


On Fri, Sep 6, 2013 at 7:37 PM, Juraj Kirchheim <back...@gmail.com> wrote:
The library implements sys.db.Connection, so technically, it can work
with Haxe's DB macros already.

But there's still work to be done, especially for decoding primitives.
At the current stage, I wouldn't be surprised if things like Dates are
not correctly converted.

Regards,
Juraj

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.

Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Justin Donaldson 9/15/13 7:38 PM
Hey folks, just wanted to mention that postgrehx has a starter test suite now.

I got it integrated with travis-ci thanks to this great blog post by Andy Li:

I'm only testing neko for now, but I'll try to run the full suite on all compatible targets soon.

Best,
-Justin

Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Cauê Waneck 9/16/13 12:41 AM
Very nice, Justin! Thanks!
I'm really starting to like pure haxe implementations - much more than using native glue code. 
Thankfully for us, the nodejs community has lots of those implementations we could port - like a mysql one!

Thanks!
Cauê

Le dimanche 15 septembre 2013, Justin Donaldson a écrit :
Hey folks, just wanted to mention that postgrehx has a starter test suite now.

I got it integrated with travis-ci thanks to this great blog post by Andy Li:

I'm only testing neko for now, but I'll try to run the full suite on all compatible targets soon.

Best,
-Justin



On Fri, Sep 6, 2013 at 6:07 AM, Cauê Waneck <waneck@gmail.com> wrote:

2013/9/6 Jason O'Neil <jason.oneil@gmail.com>
I'm aware that the DB macros have some connection specific hacks in them, especially the TableCreate class, but in a few other places as well.  At the moment I've seen these workarounds for MySQL and SQLite, so there would just have to be some testing (or thorough examination of the code) to see where these occur and where they don't.

Yes. It comes into my mind specifically the TableCreate class, and the MySQL-specific way to deal with locks and LIMIT. Limit's particularly painful to deal with, unfortunately. 

As more connection types become available it would be worth looking to minimize these hacks, and the other thing I would like to look at is having them work with an Async connection for NodeJS.  All in good time :)

That'd be awesome, Jason! By the way, just came to know your ufront.db package, and that's very useful, thanks! 


On Fri, Sep 6, 2013 at 7:37 PM, Juraj Kirchheim <back2dos@gmail.com> wrote:
The library implements sys.db.Connection, so technically, it can work
with Haxe's DB macros already.

But there's still work to be done, especially for decoding primitives.
At the current stage, I wouldn't be surprised if things like Dates are
not correctly converted.

Regards,
Juraj

--
To post to this group haxelang@googlegroups.com

http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.

--
To post to this group haxelang@googlegroups.com

http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.

--
To post to this group haxelang@googlegroups.com

http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.

--
To post to this group haxelang@googlegroups.com

http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.


--
Sent from Gmail Mobile
Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Justin Donaldson 9/21/13 10:02 AM

A quick update on postgrehx,  I've rewritten the results processing so that it is completely iterator based.  This means that individual records are retrieved off the socket as they are requested, rather than all at once.  The iterator can also be aborted, and subsequent requests will automatically discard the remaining socket messages from a previous request.  If you want the record results as a collection, you can call "results()" normally as part of the ResultSet api.  

Side note:  If you call "length()" on the ResultSet api, the remaining results will be cached to an array, and counted (Postgres doesn't tell you how many results it retrieves until the very last record has been returned).


This should make the library work much better with asynchronous methods.  However, there still can be long back end delays after certain queries (deletions, etc.), so there's still work to do there.

Best,
-Justin




--
To post to this group haxe...@googlegroups.com

http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.

Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol Justin Donaldson 12/5/13 6:21 PM
One more update on postgrehx, the pure haxe postgres library:

theRemix has helped me identify and patch a number of problems, and I think the library is approaching an "alpha" state in terms of functionality.

There's still large parts of the wire protocol that are unimplemented, but for the most part the basic query/response protocol is done.

Recently I've gotten Spod working, as well as providing more robust support for "interrupted query result retrieval" (i.e. cleaning up abandoned query results still remaining on the socket).  I've even started experimenting with Postgres's new json datatype and functions, which I think could really change the way that Haxe can interact with a database.

Best,
-Justin
 
Re: [haxe] ANN: Postgrehx, a pure-haxe implementation of the Postgres wire protocol theRemix 12/7/13 11:08 PM
Yes thank you so much for working hard on this.

I'm testing it a lot and i'm excited about this project.



On Thursday, December 5, 2013 4:21:23 PM UTC-10, Justin Donaldson wrote:
One more update on postgrehx, the pure haxe postgres library:

theRemix has helped me identify and patch a number of problems, and I think the library is approaching an "alpha" state in terms of functionality.

There's still large parts of the wire protocol that are unimplemented, but for the most part the basic query/response protocol is done.

Recently I've gotten Spod working, as well as providing more robust support for "interrupted query result retrieval" (i.e. cleaning up abandoned query results still remaining on the socket).  I've even started experimenting with Postgres's new json datatype and functions, which I think could really change the way that Haxe can interact with a database.

Best,
-Justin