Skip to content

Accessing multiple databases #3217

Answered by picklelo
chimeracle asked this question in Q&A
Discussion options

You must be logged in to vote

@chimeracle Currently the models aren't really tied to a database, it's the sessions themselves. Could you use your original approach with a helper function to achieve this? I think it should be pretty clean:

def session2():
    return rx.session(db_url2)

...

with session2() as session:
   ...

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@chimeracle
Comment options

@picklelo
Comment options

Answer selected by chimeracle
@chimeracle
Comment options

@picklelo
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants