Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 10 13:51

    bartlomieju on v0.3.3

    (compare)

  • Oct 10 13:50

    bartlomieju on bump-v020

    (compare)

  • Oct 10 13:50

    bartlomieju on master

    bump Deno to v0.20.0 (#74) * b… (compare)

  • Oct 10 13:50
    bartlomieju closed #74
  • Oct 10 13:49
    bartlomieju synchronize #74
  • Oct 10 13:49

    bartlomieju on bump-v020

    Update deps.ts (compare)

  • Oct 10 13:48
    bartlomieju opened #74
  • Oct 10 13:48

    bartlomieju on bump-v020

    bump Deno to v0.20.0 (compare)

  • Oct 01 12:16

    bartlomieju on v0.3.2

    (compare)

  • Oct 01 12:15

    bartlomieju on chore-add_contributing_guidelines

    (compare)

  • Oct 01 12:15

    bartlomieju on master

    add contributing guidelines (#7… (compare)

  • Oct 01 12:15
    bartlomieju closed #73
  • Oct 01 12:15
    bartlomieju closed #69
  • Oct 01 12:08
    bartlomieju synchronize #73
  • Oct 01 12:08

    bartlomieju on chore-add_contributing_guidelines

    add contributing guidelines (compare)

  • Oct 01 12:08
    bartlomieju opened #73
  • Oct 01 12:07

    bartlomieju on chore-add_contributing_guidelines

    add contributing guidelines (compare)

  • Oct 01 12:02

    bartlomieju on chore-update_format_script

    (compare)

  • Oct 01 12:02

    bartlomieju on master

    chore: use deno fmt (#72) * cl… (compare)

  • Oct 01 12:02
    bartlomieju closed #72
Andy Hayden
@hayd

I have pool implementation but get this error, ish on the first query:
Uncaught Error: Unexpected frame: C

I think maybe there is a race condition in insert, that awaiting an insert query doesn't guarantee that a subsequent calls see the new rows (which is surprising)...

Bartek Iwańczuk
@bartlomieju
can you put up a PR for me to see?
I expect that message flow logic is not 100% correct
Andy Hayden
@hayd
Will do!
Bartek Iwańczuk
@bartlomieju
I plan on writing a big battery of tests for it but got shortage of time lately
Andy Hayden
@hayd

Any thoughts on changing startup/exit to accept/close or open/close?
This was my WIP: hayd/deno-postgres@3c5df8d

There' some console.log so you can see where it's failing.

The manyQueries test fails, the rest pass..
Bartek Iwańczuk
@bartlomieju
awesome, I'm not sure I'll be able to work on it tonight
but tomorrow for sure
however, I'm not sure it's a good idea for users to interact with Connection object directly
but let's see down the line :) please open a PR so we can review it together
Andy Hayden
@hayd
In other libs you often have a connection and a cursor, I wonder if the lower level things ought to go into a Cursor. You could, create a pool of size 1 by default (using connect() or open(), and allow passing a size to that), and that way keep the query on the Client only.
(pool of size one is actually still nice as it queues queries)
Bartek Iwańczuk
@bartlomieju
I skimmed through pg-pool, it seems that the Pool returns Client instances instead of Connection. IMO it's pretty good solution. We don't need to expose Connection object to users (which I think is good), and Pool and Client will have very similar APIs
Andy Hayden
@hayd

Reading through the docs https://node-postgres.com/features/pooling is not that great (requiring you to hand back the Client seems like a liability... hence the large warning!) That's abstracted away in the PR.

The thing to note though, is transactions. I think that can be done by extending the Pool API to support pop a Connection from the Pool (or some small wrapper around Connection so that you can push it back to the Pool with .release). The node API is a little gnarly https://node-postgres.com/features/transactions

Bartek Iwańczuk
@bartlomieju
Thanks @hayd awesome work with #27!
Andy Hayden
@hayd
Will be interesting to see the new performance after new deno backend in merged!
Andy Hayden
@hayd

RE corpus of tests, I think copying the snippets from the node-postgres doc is probably the way to go https://node-postgres.com/

Cursor (and streams) is then the big remaining feature...!

Anyway, it's very cool to have this project for deno. :+1:

Andy Hayden
@hayd
@bartlomieju can you tag/push a release?
Bartek Iwańczuk
@bartlomieju
@hayd I've pushed v0.1.2 with CI updated to Deno v0.3.8
I'll try to work on issues over the Easter
Andy Hayden
@hayd
Thanks!
runnerSnail
@runnerSnail
i cant't import Pool,because no export in mod.ts
Bartek Iwańczuk
@bartlomieju
Hi @runnerSnail are you running latest release? If so, you can temporarily add import from pool.ts
I'll try to fix it asap, but I'm a bit caught up in work in main Deno repo
runnerSnail
@runnerSnail
okey
runnerSnail
@runnerSnail
image.png
I've already passed user database. But it reported an error
Bartek Iwańczuk
@bartlomieju
@runnerSnail it looks like you're running deno-postgres from master branch
runnerSnail
@runnerSnail
import { Client } from "https://deno.land/x/postgres/mod.ts";
Bartek Iwańczuk
@bartlomieju
try importing like this: import { Client } from "https://deno.land/x/postgres@v0.1.2/mod.ts";
sorry to leave master in non-stable state
runnerSnail
@runnerSnail
thx~
Bartek Iwańczuk
@bartlomieju
:+1: no problem
runnerSnail
@runnerSnail
image.png
my sql is right in postico ...
image.png
Bartek Iwańczuk
@bartlomieju
hey @runnerSnail, try to remove extra spaces in the query and please raise an issue on GH, I will look into it over the weekend :)
runnerSnail
@runnerSnail
ok thx~ 😄
Bartek Iwańczuk
@bartlomieju
no problem :)
Bartek Iwańczuk
@bartlomieju
MD5 password handling has been added and v0.2.0 released. As Deno it moving towards v1.0.0 I'll work more on driver as well
EnokMan
@manyuanrong
Yes, I'm looking forward to Deno 1.0. And I also created deno_mysql. But I'm not sure if the driver is better in the Native module.
Bartek Iwańczuk
@bartlomieju
@manyuanrong you can try to do something like node-postgres does - both JS and native impl (using libpq)
Andy Hayden
@hayd
Could DSO support postgres too? Is the API similar enough?
EnokMan
@manyuanrong
Sure, I think it should be easy. And I plan to do postgres adaptation. But what I want to do is at least wait for the dynamic import to complete.