for .like('foobar') then I will get the row returned as
expected.
Lastly, I'm on v0.5.1 (way behind I know!).
Any thoughts? Thanks so much,
Stephen
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group
tual encryption/decryption is handled by hitting a remote
RESTful service so I'm not sure I could do that on the DB side as you
mention. This functionality isn't mission critical so I may just have
to remove it from my application.
Thanks for your input though!
On Mar 29, 7:55 am, Michael Ba
realize I didn't provide much code and can provide a more complete
class definition if that helps.
Stephen
--
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 un
l? If
you're as confused as I am I may try to upgrade to 0.6 instead :)
On May 5, 6:52 am, Michael Bayer wrote:
> On May 4, 2011, at 8:51 PM, Stephen wrote:
>
>
>
>
>
>
>
>
>
> > Hi there,
>
> > I am on an older version of SQLAlchemy (0.5.1) an
his thread with more
details questions in the future!
On May 5, 10:24 am, Stephen wrote:
> Thanks so much for your quick response! You're awesome.
>
> Caching is done conditionally at least by object because each model
> class must set a flag on its __mapper__ to True (otherwise cachi
27;t understand how to take advantage of this through the
sqlalchemy api. Is the only way to get this through:
scoped_session(..).connection(...).execute("sql command")
Thanks,
Stephen
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy"
Hi,
Our team has been intensively using SQLAlchemy for five years now. Over the
years, we've accumulated a large number of models (roughly 350).
Over time, our app start-up has also slowed quite a bit. This has some
negative effects since it's tied to several dev processes like starting up
a s
Ah, I see. That makes sense. Thanks for the thorough response! We will look
elsewhere to improve our app startup time for now.
> 300 classes shouldn't be a 9 second operation.
It's 9s running with the profiling overhead. In reality, setup_mapping and
configure_mappers are closer to 2.5s each.
I'm trying to build a relatively unsophisticated audit trail table that
simply logs INSERTS, UPDATES, and DELETEs to certain models. The idea is to
be able to merely throw an attribute MyModel.__store_changes__ = True on a
declarative model, and let a generic SessionExtension handle the rest.
I
.new
> were INSERTs and those that were in .dirty would be UPDATES.
>
> Stephen Fuhry > wrote:
>
> > I'm trying to build a relatively unsophisticated audit trail table that
> simply logs INSERTS, UPDATES, and DELETEs to certain models. The idea is to
> be able to
han a
MySQL Stored Procedure.
Thanks in advance.
Stephen Ray
--
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...@googlegroups.com.
bably need to use the DBAPI connection directly from an Engine or a
> Connection and then manipulate the cursor directly.
>
>
> On Apr 18, 2013, at 9:18 AM, Stephen Ray >
> wrote:
>
> My environment is Python 3.2, SQLAlchemy 0.8, MySQL 5.5, and using
> MySQL-connecto
rned result set.
Thanks for your help!
Steve R
On Thursday, April 18, 2013 1:09:39 PM UTC-4, Michael Bayer wrote:
> yeah I've no idea, would need to get it working with raw cursor first to
> even know how this should be treated.
>
>
> On Apr 18, 2013, at 10:43 AM, Step
In Oracle, I would like to perform a correlated subquery where
multiple columns are specified in the set clause and those columns are
selected by the subquery. For example:
UPDATE table1 a
SET (a.column1, a.column2) = (SELECT b.column1, b.column2 FROM table2
b WHERE a.id=b.id)
WHERE a.group=:group
My envirionment is SQLAlchemy 0.7.9, pyodbc 3.0.2, Python 3.2, and SQL
Server 2008 R2 running on Windows 7
I have the following Python (details of the connection url removed - the
connection to the db succeeds):
from sqlalchemy import create_engine, MetaData, Table
engine = create_engine(dbur
Hi all.
I'm working on converting our system to use SQLAlchemy, and one thing I'm
not sure how to do properly is to track when a particular model object is
last updated. When doing just raw SQL over the DB-API, this basically meant
whenever I did a change to the model, I would issue an UPDATE state
y.
On Fri, Jan 15, 2010 at 11:38 AM, Michael Bayer wrote:
> Stephen wrote:
> > I didn't see anything in the docs or in this group so please forgive
> > me if this has been asked already.
> >
> > If I'm using sqlalchemy with an underlying mysql db, how
Oh ok that makes sense and I can easily use this. Thank you!
On Fri, Jan 15, 2010 at 2:03 PM, Michael Bayer wrote:
> Stephen Mullins wrote:
> > Cool thank you. I take it that means there's no way to do this if I'm
> just
> > using a Base model and a session.
&
Hi Bob
Looks like you're doing some fun thinking :)
Steve
On Thu, Aug 21, 2008 at 11:04 AM, Bob Farrell <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I spoke with zzzeek_ on IRC yesterday re: some code I'd written for an
> introspective cascading delete function. We were previously using the ORM t
ForeignKey(dbAsset.c.id, ondelete="NO ACTION"),
key='destination'),
sql.Column("link_type", sql.String(100), key='type',
nullable=False, default=''),
)
Just how to configure the mappers has be sa bit lost at this point.
Any pointers?
Thanks for
> The first step would be to configure the inheritance hiearchy of
> Things, as I see you have an Asset table in there as well which I'm
> assuming is a Thing subclass. The joined table inheritance section
> in the docs will explain that. then you just set up relations using
> the same techniqu
Hello Az,
Yes, Bar is the association table of Foo to Foo. In essence, this is a
self join through a join table.. I have tried and hit my head on this for
(quite literally) hours. In the end, and for the record, I ended up creating
a method on the model itself such as ;
def children(self):
tion object. it will ultimately use Foo/Bar for
> querying but attribute access would be proxied through the names you
> confgure.
>
>
> On Feb 25, 2009, at 4:11 PM, Stephen Telford wrote:
>
> Hello Az,
> Yes, Bar is the association table of Foo to Foo. In essence, thi
umn(Integer, primary_key=True)
>
> bar_table = Table('bar', Base.metadata,
>Column('parent_id', Integer, ForeignKey('foo.id'), nullable=False),
>Column('child_id', Integer, ForeignKey('foo.id'), nullable=False))
>
> Foo.chi
and of course, both the passwords -are- the same (duh ;) .. the 'get()'
works fine (obviously ;)
Regards
Stef
On Wed, Feb 25, 2009 at 7:53 PM, Stephen Telford wrote:
> Thank you Bobby!! That does make things more easier, and it shows then that
> I am being a -real- moron
It is always good to see some activity on this front.
sqlalchemy-migrate seems to be a good idea that needs more activity.
Perhaps try contributing to that project before branching.
Any comment from the sqlalchemy-migrate developers?
Stephen
On Fri, Mar 6, 2009 at 3:13 PM, J. Cliff Dyer
You could try changing your _limit tuple to a property on the class
that returns the tuple you want.
For example:
class Result(object):
def get_limit(self):
return (self.upper, self.lower, self.nominal)
_limit = property(get_limit)
Is this what you were looking for?
Stephen Emslie
Well, I would have expected ResultProxy.rowcount to do just that
(return the number of rows in the last executed statement) but I just
get 0 from it. Perhaps someone could explain how to use it correctly.
Stephen Emslie
On Thu, Mar 12, 2009 at 5:20 PM, jeff wrote:
>
> hi. this question
ined
When reflecting tables directly with sqlalchemy, using Table(name,
meta, autoload=True), one can override the reflected columns to
compensate for the lack of a primary key. Is this possible in SqlSoup?
Stephen Emslie
--~--~-~--~~~---~--~~
You received th
nd it easier at that point just to skip
SqlSoup and define the table metadata and mapping myself.
I hope that helps.
Stephen Emslie
On Sun, Apr 26, 2009 at 11:48 PM, NeilK wrote:
> Hi Stephen, did you find a way to access those tables without a
> primary key using SqlSoup?
>
> Th
part of the original join
rather than all of parent_instance's children. Is something like this
possible? The closet that I've found is using add_entity after each
join in my query.
Thanks
Stephen
--~--~-~--~~~---~--~~
You received this message because yo
-query version I have working now so
its worth investigating.
> I'd be curious though if you could play around a little with
> the approach I just suggested to see if its at all workable ?
Definitely. I dont actually understand it yet, but I'll report back on
what I find.
Thanks fo
ssion
here? MappedClass.c.age.between(1,2) behaves normally.
Stephen Emslie
--~--~-~--~~~---~--~~
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
I should probably mention that I set lazy=False on the children
relation in that example before this behavior worked.
Stephen Emslie
On 8/31/07, stephen emslie <[EMAIL PROTECTED]> wrote:
> On 8/20/07, Michael Bayer <[EMAIL PROTECTED]> wrote:
> > I'd be curious though
> would automatically add the columns to the Query's SELECT statement
> without needing to construct your from_statement() like we're doing
> above.
This would certainly neaten things up :)
Stephen Emslie
--~--~-~--~~~---~--~~
You received this
#x27;
relation coming up with subnode2 rather than node2 (i.e. skipping the
first relation), but its nice to know I wasn't completely off that
mark :)
Stephen Emslie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&
ance improvement. Using contains_eager would
allow me to cut down significantly on the number of requests I'm
performing.
Thanks for the help!
Stephen Emslie
On 9/4/07, stephen emslie <[EMAIL PROTECTED]> wrote:
> > im going to play with this a little bit, but my first instinct is
> &g
ial mappers
(the alias of the last contains_eager statement to be issued ends up
as the only 'children' relation in the result)
Any idea whether this is a bug or expected behavior? I could try to
rustle up a test script if it would help.
Stephen Emslie
On 9/11/07, stephen emslie <[EMAIL
Thanks for the quick response.
Looking forward to the refactoring :)
Stephen Emslie
On 10/9/07, Michael Bayer <[EMAIL PROTECTED]> wrote:
>
>
> On Oct 9, 2007, at 10:18 AM, stephen emslie wrote:
>
> >
> > Hi. I've been quiet on this for a while. I'm gett
children.children', alias=ali2)).one()
Traceback (most recent call last):
File "basic_tree.py", line 88, in
root = query.options(contains_eager('children', alias=ali),
contains_eager('children.children', alias=ali2)).one()
File "/home/stephen/src/sqlalchemy/l
that might actually be the correct behaviour here.
Stephen Emslie
On Nov 18, 2007 4:20 PM, Michael Bayer <[EMAIL PROTECTED]> wrote:
>
>
> On Nov 16, 2007, at 12:29 PM, stephen emslie wrote:
>
> >
> >
> >
> > I'm a bit confused now, so please tell m
(Using latest SqlAlchemy with either sqlite or postgres on a Flask server)
I have a table of entities and stats with columns: id, date, stat1, stat2,
etc.
There are a lot of endpoints on the Flask server that need to do processing
on an aggregated form of the above, something like:
SELECT id, d
Thanks Mike. That approach is working well.
On Sunday, 15 January 2017 03:48:19 UTC+11, Mike Bayer wrote:
>
>
>
> On 01/13/2017 11:13 PM, Stephen Davies wrote:
> > (Using latest SqlAlchemy with either sqlite or postgres on a Flask
> server)
> >
> > I have a
Item class
after it's defined, as follows:
StockItem.used = column_property(
select([func.coalesce(func.sum(StockOut.qty), text("0.0"))]).\
correlate(StockItem.__table__).\
where(StockOut.stockid == StockItem.id).\
label('used'),
deferred=True,
g
items[0].used,
d.items[0].remaining))
print("\n\n\n\nTrying with separate undefer() calls...")
# I expect this query to complete in one round-trip to the database,
# and it does.
s = sm()
d = s.query(Delivery).\
filter_by(id=d_id).\
options(joinedload("items")).\
That's an amazingly quick response! Thank you very much.
Stephen Early
On Thursday, 24 August 2017 16:02:41 UTC+1, Mike Bayer wrote:
>
> Alrighty I got that other case working, the issue is resolved and will
> be in the next 1.1 release which is 1.1.14.
>
> On Wed, Aug
Hi there! I'd like to propose an idea for an enhancement to the
query_expression API. I have found query_expression feature (introduced in
1.2) extremely useful, however its current API is rather awkward and lacks
any sort of conventional organizational patterns for more common, albeit
advanced
47 matches
Mail list logo