Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bring back signleton #112

Closed
Closed
@mitinarseny

Description

@mitinarseny

Before it was easy just to write

import rethinkdb as r

conn = r.connect(...)
r.table(...).run(conn)

But documentation (simply README) of rethinkdb python driver >=2.4.0 insist that now the proper way to do it is this:

from rethinkdb import RethinkDB

r = RethinkDB()
conn = r.connect(...)
r.table(...).run(conn)

It's OK to do it in single function. But it is NOT OK to do it in multiple functions and pass around the rethinkdb_instance parameter in each function that makes requests to your rethinkdb.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions