I used to find MS Access to be a very useful tool in the right hands. I've
been doing some python script coding in LibreOffice Base and started
looking at sqlalchemy it looks as if it wouldnt be too much of a job to add
the components necessary to turn LO Base front end into something not far
mappings would be helpful to
> confirm this fixed the issue.
>
> On Wed, Jun 6, 2018 at 10:32 AM, Tom Flannaghan
> wrote:
> > Thanks Mike. I've attached a script that shows the difference in case
> that
> > helps.
> >
> > --
> > SQLAlchemy -
&
Thanks Mike. I've attached a script that shows the difference in case that
helps.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See
this (and a mention of this issue in the docs).
Thanks,
Tom
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description
I moved `db.session.commit()` outside the loop. That seemed to fix the
error. I'll post an update if I get more errors.
On Wednesday, December 20, 2017 at 6:43:05 PM UTC-5, Lele Gaifax wrote:
>
> Tom Tanner <dontsende...@gmail.com > writes:
>
> > I want to query row
I want to query rows and copy them while changing an attribute of each.
Here's my code.
colObjs= db.session.query(Column).filter_by(chart_id=oldChartID).all()
for colObj in colObjs:
make_transient(colObj)
print colObj.id
del colObj.id
colObj.chart_id= newChartID
Thank you
On Wednesday, December 20, 2017 at 8:37:57 AM UTC-5, Lele Gaifax wrote:
>
> Tom Tanner <dontsende...@gmail.com > writes:
>
> > Lele, could you write the code showing how that would look? Thanks.
>
> Extending Mike's answer:
>
> from sql
Lele, could you write the code showing how that would look? Thanks.
On Wednesday, December 20, 2017 at 2:22:49 AM UTC-5, Lele Gaifax wrote:
>
> Tom Tanner <dontsende...@gmail.com > writes:
>
> > Thanks, I used the first method. Follow up question: How do I get the
> ne
Thanks, I used the first method. Follow up question: How do I get the new
primary key after running `session.commit()`?
On Tuesday, December 19, 2017 at 11:29:34 AM UTC-5, Mike Bayer wrote:
>
> On Tue, Dec 19, 2017 at 3:02 AM, Tom Tanner
> <dontsende...@gmail.com > wrote:
I'm using SQLAlchemy with the Python library Flask.
How do I query an object from a database, make a copy of it, and save that
copy to the database?
Example of querying an object.
someObj = db.session.query(SomeDataTable).filter_by(id=someID).first()
I want to save a copy of `someObj` to the
ils on db2.
Any ideas on how to proceed?
Tom
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description
the `metadata.create_all`
feature and then normalize the results and compare. if there is a mismatch the
test fails.
if you want to write more elaborate tests involving actual data, this should be
a good starting point, though
HTH,
tom
> On 23 Nov 2016, at 10:15, Chris Withers <ch...@simplistix.co.uk&
I work in a team of people collaborating on database development and we'd
like to start version controlling and deploy our changes with Alembic.
I was wondering though if there is a way to generate the DDL for the
current state of the whole schema as of a given revision... something like
the
Bayer wrote:
>
>
>
> On 08/21/2016 10:22 AM, Tom Kedem wrote:
> > It seems I confused "concrete" with "joined" inheritance.
> >
> > What I want to achieve is /joined/ inheritance. I've modified the code
> > to reflect that (just removed all c
I still get an error saying it doesn't recognize super_user
as a child of user.
On Sunday, August 21, 2016 at 6:37:19 AM UTC+3, Mike Bayer wrote:
>
>
>
> On 08/20/2016 08:27 PM, Tom Kedem wrote:
> > I suppose I could have a discriminator value for "function type", but
ong in my configuration or understanding?
On Saturday, August 20, 2016 at 10:44:24 PM UTC+3, Mike Bayer wrote:
>
> This doesn't look like a concrete mapping, you have a foreign key from
> SuperUser to User. Are you sure this isn't supposed to be an ordinary
> joined inheritance model
I have the following setup (attached python file).
I'm using an inheritance hierarchy without a discriminator field, deriving
from AbstractBase.
I want to be able to use the "keywords" attribute in the "SuperUser" class,
and from the documentation I understand I need to redefine it, however that
, August 15, 2016 at 4:38:34 PM UTC+3, Tom Kedem wrote:
>
> I'm trying to create a dynamic many_to_many relationship, inspired by:
> http://techspot.zzzeek.org/2011/05/17/magic-a-new-orm/
>
> https://bitbucket.org/zzzeek/pycon2014_atmcraft/src/f50cbe745a19/atmcraft/model/meta/?at=maste
ing iteration
I'm not sure it's flask-sqlalchemy's issue, but it's related to it. Looking
at their base class creation I don't notice anything "funny", but I'm
probably overlooking something.
On Monday, August 15, 2016 at 4:38:34 PM UTC+3, Tom Kedem wrote:
>
> I'm trying to create a dynamic
something
> that should be made to work. That is, perhaps declarative should use a
> different system internally for the __declare_first__ in order to get
> around this.
>
>
>
> On 08/15/2016 09:38 AM, Tom Kedem wrote:
> > I'm trying to create a dynam
Hi Mike,
Your fix worked - the example I gave and our other tests pass now.
Many thanks,
Tom
On Mon, 19 Oct 2015 at 17:19 Mike Bayer <mike...@zzzcomputing.com> wrote:
>
>
> On 10/19/15 11:57 AM, Mike Bayer wrote:
> >
> >
> > On 10/19/15 11:44 AM, Steven Winfi
Hi,
We are currently trying to upgrade to sqlalchemy 1.0.8 and have hit a
problem with executemany() and row versioning. We are using postgres and
psycopg2 as a backend. We have tables that use server side versioning (as
discussed at
Thanks a lot! This works well.
Tom
On Thu, 16 Jul 2015 at 21:23 Mike Bayer mike...@zzzcomputing.com wrote:
On 7/16/15 2:28 PM, Tom Flannaghan wrote:
Thanks for your reply. Our exact problem is that we are creating empty
detached objects from the primary key alone, and then merging them
object directly rather than expunging one from
the session and the problem still occurs, so it seems to be caused by the
load=False option.
Thanks,
Tom
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop
(detached_port, load=False)
...
In my example, Port only has two columns so this won't demonstrate the bug
as the only non-deferred column is filled in already, but more complicated
objects that are merged in this way will not defer columns. Do you think there
a work around in this case?
Thanks,
Tom
():
raise SessionLeftUnclean()
Any and all help gratefully appreciated!
Regards,
Tom
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalchemy+unsubscr
On Thursday, 9 October 2014 16:51:49 UTC+1, Michael Bayer wrote:
On Oct 9, 2014, at 6:09 AM, Tom Dalton tom.d...@fanduel.com javascript:
wrote:
Using SQLAlchemy 0.9.
I am writing a server, that's running in gevent. As part of the library
code, I am trying to write a session
to handle/be careful of?
Thanks a lot for your help!
Tom
On 9 October 2014 17:42, Michael Bayer mike...@zzzcomputing.com wrote:
On Oct 9, 2014, at 12:16 PM, Tom Dalton tom.dal...@fanduel.com wrote:
Thanks for the reply. I saw the session transaction events stuff but I'm
not sure that they help
So, create a Table, use that, make sure you’re sending the right kinds of
objects to bulk_insert().
Thank you very much for that very quick reply, this did the trick. The
try/except blocks in my post above were just to show what I've tried so far.
I'll include my working code so that it
I went ahead and asked this on stackoverflow if anyone would like to have a
stab at it.
http://stackoverflow.com/questions/11021020/emulating-appengine-list-property-with-postgresql-array-and-sqlalchemy
On Tuesday, June 12, 2012 7:34:42 AM UTC-4, Tom Willis wrote:
Hello,
I'm hoping
?
On Jun 13, 2012, at 2:24 PM, Tom Willis wrote:
I went ahead and asked this on stackoverflow if anyone would like to have
a stab at it.
http://stackoverflow.com/questions/11021020/emulating-appengine-list-property-with-postgresql-array-and-sqlalchemy
On Tuesday, June 12, 2012 7:34:42
with psycopg2 directly. If you can get
it to work with psycopg2 alone, passing the desired value as a bound
parameter, then we can work out what the type engine needs to do or not.
On Jun 13, 2012, at 3:07 PM, Tom Willis wrote:
Well I had written another type to emulate appengines Key, basically
Hello,
I'm hoping that some of the functionality I actually like in appengine
datastore can be duplicated in postgresql via sqlalchemy. However I'm not
quite grokking how all the moving pieces for a dialect(if that's the right
term) fit together.
On appengine there are list properties or
VALUES(2,'bar');
COMMIT;
sqlite
Any idea on how to support this approach in both 0.6 and 0.7? Thanks
for any advice.
..Tom
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe
do this?)
I hope I have explained this well enough for some suggestions and / or
workarounds.
Thanks
..Tom
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from
not even sure it has to do with Sqlalchemy
(I'm using version 0.5.8, with Postgres).
Any pointers in the right direction would be greatly appreciated.
- Tom
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email
that rollback is
called automatically anytime a commit fails, but I'm not so sure
anymore.
On Sep 29, 4:07 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Sep 29, 2010, at 7:13 AM, tom wrote:
Hey,
I'm applying finishing touches to my web app before rolling it out,
when this strange error
Thank you very much, that was very helpful!
On Sep 29, 5:27 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Sep 29, 2010, at 11:03 AM, tom wrote:
First, thanks for that quick answer, that explains it. I turned
autocommit on, and it works again.
That leads me to this question: I do
That was indeed my problem, thank you very much! But I still cannot
wrap my brain around cascading, if anyone has a link to a good writeup
I'd be glad.
--tom
On Jul 13, 12:51 am, Conor conor.edward.da...@gmail.com wrote:
On 07/12/2010 02:38 PM, tom wrote:
Hi,
I have a problem
,multiple
tables, private-user's tables) efficiently and without letting the
user be aware of implementaion.
anyone?
:)
thanks
tom
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com
understand how I could do what I want with pure
introspection like I do now.
-Tom
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalch...@googlegroups.com.
To unsubscribe from this group, send email
Ok, here's a small test. It actually works fine when using sqlite, but
not when using postgresql. I want it to work with postgresql!
This probably helps more than the description above.
http://www.pylonshq.com/pasties/fe6a2857f3f72d499914caabce0d41bc
-Tom
On Nov 23, 10:33 am, Tom Burdick
,
if I modify an existing column, eg. from Column('subject', String
(128)) to Column('subject', String(128), default='(no subject)'), and
then do create_all, nothing changes.
Is create_all the wrong thing to do there, or where am I going wrong?
Regards,
Tom
From what I see, you forgot the self argument in the getRendered
function definition.
def getRendered(self):
return '%s\n%s' % (self.title, self.content)
On Aug 10, 5:00 am, Andreas andr...@flausch.at wrote:
Arghh... I got it.
The problem was that I wasn't querying through a session,
on a separate system (Debian again.)
-Tom
On Apr 30, 11:06 pm, mtrier mtr...@gmail.com wrote:
On Apr 30, 11:04 pm, mtrier mtr...@gmail.com wrote:
Some additional info, and a possible fix:
===
--- lib/sqlalchemy/databases
Hi Lucas,
I don't think #1350 applies here, but just in case, I pass-ed out
the mssql dialect do_begin per the suggestion in the discussion thread
referenced by that ticket: no impact on the invalid cursor state
exception.
-Tom
Can you read over this ticket and see if maybe you
the same results or not! :-)
FYI: The test succeeds using SQLAlchemy 0.5.0rc3, but fails with every
subsequent release. It also passes running against a sqllite db.
Thanks very much.
Tom Wood
University of Connecticut
# begin test code
import sqlalchemy as sa
from sqlalchemy import orm
conn
with no relations) do succeed.
-Tom
On Apr 27, 12:18 pm, Lukasz Szybalski szybal...@gmail.com wrote:
On Mon, Apr 27, 2009 at 10:01 AM, Tom Wood thomas.a.w...@gmail.com wrote:
Hi all,
Am having a problem with SQLAlchemy 0.5.3 and MSSQL. Running on a
Debian stack, using FreeTDS 0.82, pyodbc
Corrected in r5204. http://www.sqlalchemy.org/trac/changeset/5204
Ticket details: http://www.sqlalchemy.org/trac/ticket/1206
-Tom H
On Oct 27, 4:35 pm, Tom H [EMAIL PROTECTED] wrote:
Thanks Michael,
I posted a new ticket at:http://www.sqlalchemy.org/trac/ticket/1206
Best Regards,
-Tom H
Thanks Michael,
I posted a new ticket at:
http://www.sqlalchemy.org/trac/ticket/1206
Best Regards,
-Tom H
On Oct 27, 4:13 pm, Empty [EMAIL PROTECTED] wrote:
Tom,
On Mon, Oct 27, 2008 at 4:03 PM, Tom H [EMAIL PROTECTED] wrote:
I'm experiencing the following problem with SA 0.4.7
Depending on security preferences, it may be desirable to keep
database passwords out of code files.
One of the recommendations for MySQL is to keep the password in
a .my.cnf file accessible only to the user.
http://dev.mysql.com/doc/refman/5.0/en/password-security.html
To use the .my.cnf
shed some light, I would be grateful. Thanks for your
help!
Cheers,
Tom
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe
Michael, thanks for your quick and helpful response.
For any new project, I would strongly urge the usage of 0.5...
Our project isn't new, but I think it's time to move to SA 0.5. :-)
Cheers,
Tom
--~--~-~--~~~---~--~~
You received this message because you
The manager and direct reports example was just what my project
needed. I'm looking forward to upgrading to 0.5 in the future so that
I don't have to enter redundant primaryjoin and secondaryjoin on the
backref.
Thank you Mike!
On Jun 28, 1:10 am, Tom Hogarty [EMAIL PROTECTED] wrote:
Wow
Hello,
I have a table that stores binary file data in one column and
information about the file (file name, mime type, sha1 sum, etc) in
the other columns.
Currently when I use the mapped class, it loads the file data (adds to
network and memory load). What I would like to do is check the sha1
Deferred column loading is exactly what I needed, thanks Rick!
Coming from a pure SQL background I'm starting to get familiar with
all this new ORM and SQLAlchemy terminology. It's worth it though, the
code is so much cleaner and more maintainable than stringing together
huge complicated SQL
hints on how I can do this. I have other basic relations working
(1-1, 1-M, M-1) but they all have different classes/tables on each end
of the relation.
Regards,
-Tom
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Wow, thank you very much for the detailed example. It looks like just
what I need. I look forward to trying it out very soon.
-Tom
On Jun 27, 6:12 pm, Michael Bayer [EMAIL PROTECTED] wrote:
this relation will require you to configure primaryjoin and
secondaryjoin (it should be raising
Thanks for the info, I had the same problem and was able to fix it by
renaming my relation to not override the other one and turning off
allow_override. Removing allow_column_override would help eliminate
the confusion since replacing the column makes the relation not work
without the
-Original Message-
From: sqlalchemy@googlegroups.com sqlalchemy@googlegroups.com
To: sqlalchemy sqlalchemy@googlegroups.com
Sent: Mon Feb 04 16:09:49 2008
Subject: [sqlalchemy] Oracle, limit, and polymorphism
Hey all,
I'm rather new to sqlalchemy, I've been playing with it for about a
-Original Message-
From: sqlalchemy@googlegroups.com sqlalchemy@googlegroups.com
To: sqlalchemy sqlalchemy@googlegroups.com
Sent: Mon Feb 04 16:09:49 2008
Subject: [sqlalchemy] Oracle, limit, and polymorphism
Hey all,
I'm rather new to sqlalchemy, I've been playing with it for about a
-Original Message-
From: sqlalchemy@googlegroups.com sqlalchemy@googlegroups.com
To: sqlalchemy sqlalchemy@googlegroups.com
Sent: Mon Feb 04 16:09:49 2008
Subject: [sqlalchemy] Oracle, limit, and polymorphism
Hey all,
I'm rather new to sqlalchemy, I've been playing with it for about a
62 matches
Mail list logo