Re: Executing on the connection?

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Executing on the connection?
Дата
Msg-id b4f9f222-fc78-1930-596b-9daf05f9d43c@aklaver.com
обсуждение исходный текст
Ответ на Executing on the connection?  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Ответы Re: Executing on the connection?  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Список psycopg
On 12/2/20 3:20 AM, Daniele Varrazzo wrote:
> Hello,
> 

> 
> As a result people could use:
> 
>      conn = psycopg3.connect(dsn)
>      record = conn.execute(query, params).fetchone()
>      # or
>      for record in conn.execute(query, params):
>          ... # do something

That is what the sqlite3 module does and I find it handy.

> 
> No other methods bloating the connection interface: no executemany(),
> copy(), callproc (actually there will be no callproc at all in

Just to be clear the above(callproc excepted) or some variation of it 
will still be available off the cursor interface, correct?

> psycopg3: postgres has no fast path for function call and too much
> semantics around stored procedure that a single callproc() couldn't
> cover).
> 
> Being the cursor client-side, its close() doesn't actually do anythin
> apart from making it unusable, so just disposing of it without calling
> close() is totally safe.
> 
> Thoughts?
> 
> Cheers!
> 
> -- Daniele
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



В списке psycopg по дате отправления:

Предыдущее
От: Vladimir Ryabtsev
Дата:
Сообщение: Re: Executing on the connection?
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Re: Executing on the connection?