Tagged Questions
0
votes
0answers
22 views
Oracle database schema using SQLAlchemy
I have a problem with SqlAlchemy. When I define the schema in my Oracle database, foreign keys are not recognized in other tables. Tested without using layout and it worked. But I need to define the ...
0
votes
0answers
20 views
getting user input from mouse click
I was wondering if it's possible to get user input from whatever the user clicks on (e.g a link) and storing it as a string value? For example, I have a link "hello" and when the user clicks on that ...
1
vote
1answer
15 views
How to dynamically create classes inside a module-level initialize() method in Python
I'm writing a library to talk to a database using SQLAlchemy. I really like SQLAlchemy's autoload_with=engine feature, which can be passed to the Table constructor to grab all of the table's columns ...
0
votes
0answers
10 views
Issue with multiple sessions
In my application I'm using SQLAlchemy for storing most persistent data across app restarts. For this I have a db package containing my mapper classes (like Tag, Group etc.) and a support class ...
2
votes
0answers
11 views
Is there a way to perform a join across multiple sessions in sqlalchemy?
If I have multiple sessions to different databases, is there a way to perform a join across them in one query?
For instance, I'm integrating two programs, with a table in the middle to translate id's ...
0
votes
0answers
16 views
Alembic detects changes but produces empty migration with --autogenerate
I'm trying to get alembic working auto-producing migrations with the --autogenerate flag.
When I run alembic -n mydbname --autogenerate -m "my message" I get something like:
INFO ...
0
votes
1answer
28 views
Error flask-sqlalchemy NameError: global name 'joinedload' is not defined
I'm trying to use a sqlalchemy loading strategy to speed up my queries. After reading this I realized that I was making the mistake of looping through the records in my template. The only problem is ...
0
votes
2answers
27 views
SQLAlchemy variable relationship
I'm unclear on how to configure SQLAlchemy for the following scenario:
Several tables of varying nature.
All tables need to reference a one-to-many notes table
Would like to only have one notes ...
0
votes
0answers
17 views
sqlalchemy undefined Table
Not sure why, but I get
NameError: name 'Table' is not defined
with the following code. Anyone have any idea?
from sqlalchemy import create_engine, MetaData
class Boo:
engine = ...
0
votes
0answers
23 views
Debianize SQLAlchemy using python-stdeb & dpkg
I am trying to build a .deb package for sqlalchemy, using the python stdeb builder.
Respecting the python stdeb usage I use the following instructions:
wget ...
3
votes
1answer
42 views
Override the __eq__ operator in sqlalchemy
I'm working with declarative base SQLAlchemy. I'm in need of a string column that can be nulled but not have the NULL != NULL problem that comes along with databases. So I've written a custom ...
1
vote
1answer
50 views
sqlalchemy bulk update performance problems
I need to increment values in a column periodically with data I receive in a file. The table has > 400000 rows. So far, all my attempts result in very poor performance.
I have written an experiment ...
0
votes
1answer
35 views
should SQLAlchemy session.begin_nested() be committed with transaction.commit() when using pyramid_tm?
I'm developing a pyramid application and currently in the process of moving from sqlite to postgresql. I've found postgresql more restrictive transaction management is giving me a bad time.
I am ...
0
votes
2answers
24 views
sqlalchemy does not enforce foreign key constraing
I am trying to play with the sql alchemy ORM based db definition.
I have defined my tables as follows
class Customer(Base):
__tablename__ = 'customer'
id = Column(Integer, ...
1
vote
0answers
36 views
Where are the python-native objects for SQL-Alchemy?
In an ORM I would expect to be able to do this:
session.add(Lake("hello",Polygon([(0,0),(1,0),(1,1)])))
lake = session.get(Lake).first()
assert isinstance(lake.geometry, Polygon)
assert ...