Hi,
I have a mixin like:
class BasicSqlClass(object):
@declared_attr
def __tablename__(cls):
return convert(cls.__name__) + 's
The mixin declares the table name and does other stuff.
Hover, there is a class where I wanted to overwrite the mixed-in
__tablename__ by declaring
Hi,
I've been trying to better understand the properties of different Postgres
JSON field implementations. I wrote s script with my tests and I thought I
would share it. It can be found at:
https://gist.github.com/vfr292/41530bfb56778ffc26fe53c605f40feb
FWIW, I found implementing the field
at 1:01:06 PM UTC-7, Mike Bayer wrote:
>
> On Tue, Jun 26, 2018 at 3:56 PM, Victor Reichert
> > wrote:
> > Hi,
> >
> > I have a class like:
> >
> > class SQLClass(db):
> >
> > json_field = Column(sqlalchemy.dialects.postgresql.JSONB)
&g
Hi,
I have a class like:
class SQLClass(db):
json_field = Column(sqlalchemy.dialects.postgresql.JSONB)
I'm doing something like:
session.add(
SQLClass(json_field = dict(
key = [value1]
)
))
session.commit()
slq_class_obj = session.query(SQLClass).first()
new_dict =
, at 1:00 AM, Victor Reichert vfr...@gmail.com
javascript: wrote:
I've taken another look at trying to eager load the address.parent. Is it
possible to do that?
Unfortuntately not really. It should be in theory but I’m not able to
work out an eager load that goes to both Customer
I should add the final version of my file ist at:
https://gist.github.com/vfr292/3330037cf5bc621d3d4b should anyone want to
reference it.
Thank you again Mr. Bayer!
On Monday, November 24, 2014 11:00:06 PM UTC-8, Victor Reichert wrote:
Thank you! You are not an SQL alchemist, you are a SQL
sqlalchemy.exc.ArgumentError: mapper option expects string key or
list of attributes
Any advice on how I can eager load address.parent would be much appreciated
:)
Sincere thanks,
~Victor
On Sunday, October 26, 2014 3:06:13 AM UTC-7, Michael Bayer wrote:
On Oct 26, 2014, at 12:07 AM, Victor Reichert vfr...@gmail.com
and make them eager loaded?
Thank you again :)
~Victor
On Sunday, October 26, 2014 3:06:13 AM UTC-7, Michael Bayer wrote:
On Oct 26, 2014, at 12:07 AM, Victor Reichert vfr...@gmail.com
javascript: wrote:
Hi,
I am following the Generic Association with Discriminator on Association
example
Hi,
I am following the Generic Association with Discriminator on Association
example at:
http://docs.sqlalchemy.org/en/latest/_modules/examples/generic_associations/discriminator_on_association.html
However, I would like to eager load the customer.addresses in a query like
eager_sales_persons
Hi,
I had been struggling to find how to implement a generic association and
the documentation for inherited polymorphic relationships wasn't really
helping. After some (a lot) of searching I found some great examples of
how to implement what I was looking for.
An example of the Rails
Hi,
I'm using flask-sqlahcmey and I have a self referential relationship like
this:
class FileData(db.Model):
id = db.Column(db.Integer, primary_key = True)
primary_file_data_id = db.Column(db.Integer, ForeignKey('file_data.id'))
is_edited_file = db.Column(db.Boolean, default =
...@zzzcomputing.com
javascript: wrote:
you can filter the warnings as “ALWAYS” for now, and the warning here
should probably not come out if you’ve in fact given remote_side so please
raise an issue for that.
On Sep 11, 2014, at 2:38 AM, Victor Reichert vfr...@gmail.com
javascript: wrote:
Hi,
I'm
Hi,
I'm trying my first eager load, and unfortunately it is a complex one. If
the eager load is working, will an engine with the echo turned on still
emit sql for the eager loaded objects? If so, how do I tell if the the
object was actually eager loaded? The generated SQL looks correct, but
Thank you for your response Jonathan!
I'm new to sqlalchemy, what am I looking for with the log line? The time
that passes between about to touch bars and touched bars or am I looking to
see if SQL is generated?
~Victor
--
You received this message because you are subscribed to the Google
Thank you again!
From the sql I'm getting (referenced as a pastie in my original post) t
looks like the records are bing loaded that I intended to be eager loaded.
D'oh!
~Victor
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe
Hi,
I'm running:
selected_eventids = []
selected_event =
self.session.query(Master_Simulation_Event).filter(Master_Simulation_Event.cumulative_probability
= selection_percentile,
Master_Simulation_Event.event_id.notin_(selected_eventids) ).\
it to my mind. :)
2013/7/18 Michael Bayer mik...@zzzcomputing.com javascript::
On Jul 18, 2013, at 6:52 PM, Victor Reichert
vfr...@gmail.comjavascript:
wrote:
HI All,
I'm working on my first SQL Alchemy project. I'm thinking I'm going to
define a commit method for all
HI All,
I'm working on my first SQL Alchemy project. I'm thinking I'm going to
define a commit method for all the objects I want persist, I'm thinking
something like:
def commit(self):
session = Session() #Session is a global sessionmaker
session.add(self)
Hello,
I am attempting to implement a relationship accross two MSSQL databases
that may or may not be on the samer server. The catch is that MSSQL does
not support cross database forgien key contraints (the tables must be in
the same db).
I am trying to to implement the relationship with a
as:
[['dsn=mydsn;Trusted_Connection=Yes'], {}]
looks good to me, so good luck !
On Jun 5, 2013, at 9:47 PM, Victor Reichert vfr...@gmail.comjavascript:
wrote:
Hello World!
This is my first foray into python and SQL Alchemy, and I'm spinning my
wheels. I'm running the code below
Hello World!
This is my first foray into python and SQL Alchemy, and I'm spinning my
wheels. I'm running the code below and am able to connect to my DB and
query data without error.
import pyodbc
cnxn = pyodbc.connect('DSN=py_test; Trusted_Connection=Yes')
However, when I try
import
21 matches
Mail list logo