I'm trying to update an audit log table called 'loggings', here is the
definition of the corresponding model:
class *Logging*(Base):
__tablename__ = 'loggings'
id = Column(GUID(), primary_key=True, nullable=False, default=uuid4)
target_id = Column(GUID(), doc="The ID of the altered
Oh right, I've used the @property decorator before, just been a while.
Thanks for the explanation of @hybrid_property. Makes sense.
On Wed, Jun 7, 2017 at 5:32 PM, mike bayer <mike...@zzzcomputing.com> wrote:
>
>
> On 06/07/2017 06:19 PM, Greg Silverman wrote:
>
>> Th
Thanks, it worked!
I tried something similar using the @hybrid_property decorator, but could
not get it to work. What exactly is the difference between that and the
@property decorator?
Greg--
On Wed, Jun 7, 2017 at 5:08 PM, mike bayer <mike...@zzzcomputing.com> wrote:
>
>
> O
Hi,
Thanks for pointing that out. It's still throwing the same error, even when
changed. Does not seem to like passing the column name to the
column_property method.
Greg--
On Wed, Jun 7, 2017 at 3:30 PM, Jonathan Vanasco <jonat...@findmeon.com>
wrote:
> These are two different line
Yes, I can certainly do that. Sounds pretty simple, actually. I may have
more questions as I dive into this.
Thanks!
On Mon, Apr 24, 2017 at 3:06 PM, mike bayer <mike...@zzzcomputing.com>
wrote:
>
>
> On 04/24/2017 03:42 PM, Greg Silverman wrote:
>
>> My naive first
, 2017 at 12:21 PM, mike bayer <mike...@zzzcomputing.com>
wrote:
>
>
> On 04/24/2017 12:51 PM, Greg Silverman wrote:
>
>> Hi Mike,
>> I'm finally getting to this. Instead of having both a detail and grouped
>> methods, I would like to have only the grouped m
elaborate a bit how these would work within context of the
class?
Thanks!
Greg--
On Wed, Mar 1, 2017 at 8:53 PM, mike bayer <mike...@zzzcomputing.com> wrote:
>
>
> On 03/01/2017 08:27 PM, GMS wrote:
>
>> I have the following class models:
>>
>&g
wrote:
>
>
> On 03/01/2017 10:22 PM, Greg Silverman wrote:
>
>>
>>
>> On Wed, Mar 1, 2017 at 8:53 PM, mike bayer <mike...@zzzcomputing.com
>> <mailto:mike...@zzzcomputing.com>> wrote:
>>
>>
>>
>> On 0
d_list_of_diagnosis_detail):
>
> for (dx_code, patient_id), details in
> itertools.groupby(sorted_list_of_diagnosisdetail, keyfunc):
> diagnosis_group = DiagnosisGroup(
>dx_code, patient_id
> )
> diagnosis_group.details = de
I should add: The specific queries I was running that were throwing the
error all worked using your test case setup.
Greg--
On Fri, Nov 11, 2016 at 10:50 AM, Greg M. Silverman <g...@grenzi.org> wrote:
> Hi Mike,
> Modifications of your test made to point to the actual databa
.
Interesting.
Thanks!
Greg--
On Thu, Nov 10, 2016 at 8:33 PM, mike bayer <mike...@zzzcomputing.com>
wrote:
>
>
> On 11/10/2016 08:10 PM, horcle_buzz wrote:
>
>> I am using SQLAlchemy and am having an issue wrt to an SQLite error:
>>
>>
>> |
>> SQLite
Unfortunately, the data are out of our control. However, this solution
looks like it will do the job.
Thanks!
Greg--
On Mon, Jun 6, 2016 at 5:54 PM, Mike Bayer <mike...@zzzcomputing.com> wrote:
>
>
> On 06/06/2016 11:21 AM, Horcle wrote:
>
>> I have the following model
:]:
query = query.join(eval(table), eval(criterion))
Where the variables table and criterion were built lists, so that I ended
up doing a Cartesian product of all my tables, which was giving me many
problems, with aliasing being the least of it!
Thanks!
Greg--
On Tue, Mar 24, 2015 at 11:22 PM, Jonathan
Hi Jonathan,
For the record, in my current setup, I installed python via Homebrew. Prior
to that, I was using the Apple build of python, which would have been the
32-bit version that came with Lion.
Greg--
On Mon, Sep 8, 2014 at 6:31 PM, Jonathan Vanasco jonat...@findmeon.com
wrote:
Looking
I think I am going to dump SQL Server and just go with Postgres. Much
easier, and less of a headache. Fortunately, we are not yet in production.
Thanks!
Greg--
On Thu, Sep 4, 2014 at 8:31 PM, Horcle g...@umn.edu wrote:
Thanks. I forgot to mention that I had tried adding the encoding scheme
SELECT default_schema_name FROM
sys.database_principals
WHERE name = ?
AND type = 'S'
On Mon, Aug 18, 2014 at 9:47 AM, Horcle g...@umn.edu wrote:
On Friday, August 15, 2014 8:28:41 PM UTC-5, Michael Bayer wrote:
On Aug 15, 2014, at 5:03 PM, Greg
I'm trying to get a series of datetimes using func.datetime. The format of
input is func.datetime(basetime, '+ NNN seconds'), which works nicely if
the shift applied is constant. However I need to add 10, 20, 30 seconds,
etc to this base time. So I want something like func.datetime(basetime,
Is it possible to remove mapper events? Specifically I want to call
event.remove(mapper, 'mapper_configured', fn) but I get an error back
saying Mapper is not iterable.
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To unsubscribe from this
I'm writing an application that uses kivy for GUI and sqlalchemy for ORM.
Each has its own instrumentation system, and I initially planned to connect
them by 1) mirroring relevant SA attributes in kivy at init, 2) work with
only the kivy versions of the attributes for the duration of the app,
= relationship('AB',
collection_class=attribute_mapped_collection('a')
)
@event.listens_for(A.ab, append)
def append(target, value, initiator):
value.b.ab[value.a] = value
On Jul 8, 2013, at 9:07 PM, Greg Yang sorcer...@gmail.com javascript
I created a class CorrelatedProxy inheriting from AssociationProxy that
allows the creator function to depend on the owner instance of the
association proxy. Essentially it gets a attribute 'correlator' of the
something like lambda x: lambda y, z: Constructor(x, y, z), and then
intercepts the
).options(joinedload(children)):
for b in beta.children:
assert b.id == beta.id
assert b.a_re in beta.a_re.children
On Jun 11, 2013, at 6:34 PM, Greg Yang sorcer...@gmail.com javascript:
wrote:
How would you use proxies? I can get B.a_re.children.b_re, but this
includes
Consider these 2 mapped classes
from sqlalchemy.engine import create_engine
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.ext.declarative.api import declarative_base
from sqlalchemy.orm import relationship
from sqlalchemy.orm.session import sessionmaker
from
, that represents all the intermediary rows. Might
work, might not, would have to spend a few hours with it.
Is there a reason you can't just route to the related B.a.children.bsusing
proxies? Or a @property based loader?
On Jun 11, 2013, at 4:45 PM, Greg Yang sorcer...@gmail.com
Right now query.order_by(composite) gives a sqlite3 operational error,
because the rendered SQL is ORDER BY (composite_val1, composite_val2,
composite_val3) instead of ORDER BY composite_val1, composite_val2,
composite_val3. (The parenthesis is causing an error)
For example, consider the code
Awesome! The changes should be able to cover the issue.
On Saturday, June 8, 2013 12:40:51 PM UTC-5, Michael Bayer wrote:
On Jun 8, 2013, at 1:33 AM, Greg Yang sorcer...@gmail.com javascript:
wrote:
if __name__ == '__main__':
engine = create_engine('sqlite:///:memory
Right now a filter clause AssociationProxy == None
Consider the following code:
from sqlalchemy.engine import create_engine
from sqlalchemy.ext.associationproxy import association_proxy
from sqlalchemy.ext.declarative.api import declarative_base
from sqlalchemy.orm import relationship
from
Hi,
I was naively trying to clear a db earlier in the day and I ran into this
problem: 'Cannot delete or update a parent row: a foreign key constraint
fails'
So as anyone would do I've been searching online and through the
documentation on how to turn the foreign keys off, on delete =
Excellent. Thanks very much.
--
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 to
sqlalchemy+unsubscr...@googlegroups.com.
For more
Hi All,
I'm new to sqlalchemy. I've been reading the documentation and group
archives, but can't really find an answer to my question. I suspect
it's a question of terminology, and that I don't really know the term
for what I'm looking for.
Can I map a nested list to one column, and have my
, engine, autoload_with=engine)
B = Table('Table_B', metadate, engine, autoload_with=engine)
Now, how do I go about creating a link, say A_id, from table 'B' to
table 'A.id'
Thanks for your help!
--greg
--~--~-~--~~~---~--~~
You received this message because you
of this!
--greg
--~--~-~--~~~---~--~~
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 this group, send email to
sqlalchemy+unsubscr
I just noticed that part of this has been answered yesterday. I
apologize for the redundancy; I did not think I had posted the earlier
request.
--greg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy
Yeah, I can get it to you, but in the reply box I'm not seeing
anything here about attachments. There's just Send, Discard, Add Cc,
or Edit Subject. I am set up to use this group only through the
browser.
On Jan 23, 12:35 pm, Don Dwiggins d...@dondwiggins.net wrote:
Greg wrote:
I think I
Thanks, I'll try this out and let you know how it goes.
On Jan 23, 12:43 pm, Rick Morrison rickmorri...@gmail.com wrote:
Uh, did you guys not see my last message in this thread?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
The commit mentioned earlier fixed the issue. Thanks for all the help.
--~--~-~--~~~---~--~~
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
I think I found one that might help. Where can I upload this HTML file
it generated?
On Jan 22, 12:57 pm, Don Dwiggins d...@dondwiggins.net wrote:
Greg wrote:
Unfortunately, I'm connecting remotely via iODBC and do not have said
tools. I'm running Ubuntu Linux, if you know of any way to get
,
autoload_with=engine)
On Jan 21, 1:14 am, Michael Bayer mike...@zzzcomputing.com wrote:
yeah i meant send along the CREATE TABLE to the mailing list here.
or a describe, whatever shows us what column type might be failing.
On Jan 20, 2009, at 9:45 PM, Greg wrote:
How do I go about
As a disclaimer, this is a legacy system in which I have no control
over, so what you are about to see is pretty disturbing :)
http://pastebin.com/m10d49ac1
The formatting is pretty crazy, I'm hoping you can make use of this.
--~--~-~--~~~---~--~~
You received
Unfortunately, I'm connecting remotely via iODBC and do not have said
tools. I'm running Ubuntu Linux, if you know of any way to get the
same thing prettied up, let me know and I will.
On Jan 21, 12:22 pm, Don Dwiggins d...@dondwiggins.net wrote:
Greg wrote:
As a disclaimer, this is a legacy
I've got the following code to reflect an MS SQL 8 database using the
latest stable pyodbc, python 2.5, and SQLAlchemy 5.1:
engine = create_engine('mssql://userXXX:pass...@mydsn', echo=False)
meta = MetaData()
meta.bind = engine
artreqs = Table('tb_FSAR_Data_SampArtReq', meta, autoload=True,
like.
On Jan 20, 2009, at 4:20 PM, Greg wrote:
I've got the following code to reflect an MS SQL 8 database using the
latest stable pyodbc, python 2.5, and SQLAlchemy 5.1:
engine = create_engine('mssql://userXXX:pass...@mydsn', echo=False)
meta = MetaData()
meta.bind = engine
artreqs
How do I go about doing this? Showing the create table?
On Jan 20, 4:54 pm, Rick Morrison rickmorri...@gmail.com wrote:
I'm just trying to introspect an existing production database, not
create any new tables.
The structure of the table is read when reflecting the table: it's likely
that
/lib/python2.5/site-packages/SQLAlchemy-0.5.0rc3-
py2.5.egg/sqlalchemy/orm/query.py, line 241, in _only_mapper_zero
raise sa_exc.InvalidRequestError(This operation requires a Query
against a single mapper.)
InvalidRequestError: This operation requires a Query against a single
mapper.
Thanks.
Greg
I noticed current release information is now available on the
SQLAlchemy homepage! Good job!
Greg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send email to sqlalchemy
? If not, what exception will user code see?
I found that various threads on automatic reconnection and I assume SA
does not currently, reliably, support automatic database reconnection?
Greg
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Perhaps I missed it, but it would be great if you guys would update
the Latest News section on the SA homepage when a new release is made
available.
Greg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy
or
something which has nothing to do with a psycopg2 operation...we're
not sure if this is some artifact of native python extensions or what).
Interesting. So there is no generic method for catching this category
of error with SQLAlchemy right now, assuming the DBAPI actually
returns an exception?
Greg
.
Just some food for thought.
Greg
On Apr 2, 12:33 pm, Michael Bayer [EMAIL PROTECTED] wrote:
releases are announced on this mailing list as well as the Python
cheeseshop (and all feeds which aggregate it, such as planet
python). you can also subscribe to be a watcher on sourceforge
where
Frankly I'm very surprised this class of error has not been previously
addressed.
I'll have to test and see what happens. I was planning on doing the
defensive coding, followed by the testing to make sure it is caught
and recovers correctly.
Greg
On Apr 2, 12:36 pm, Paul Johnston [EMAIL
. Application attempts to query
database. What does SA return? In this case, it should know it does
not have any connections within its pool. Is this documented?
Is there any documention which describes the known failure modes which
SA detects? If so, link please?
Greg
On Apr 2, 1:11 pm, Michael
On Apr 2, 12:36 pm, Paul Johnston [EMAIL PROTECTED] wrote:
Greg,
If you can send the traceback you get when such an error occurs, that
would be helpful for providing Oracle support for this condition.
Paul
I assume this means that the exception is not being caught and wrapped
that
later this week. My DB server is a shared server so shutting it down
for the whole group is not well receieved. ;)
Paul
Greg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group
imported. If you don't want to wait for the next release,
search the google group and you'll find the proper hook file contents.
Hope this isn't too much of a commercial.
Greg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
the author will be able to better address your
questions/concerns.
Greg
On Apr 2, 6:02 pm, Michael Bayer [EMAIL PROTECTED] wrote:
thats great. we are going to be checking in some code soon that will
look for alternate database modules via pkg_resources...is that
supported by PyInstaller also
could test this by driving your
application with a set of fixed inputs.
One of the gotchas of using psyco is memory use goes through the roof
in exchange for much improved performance.
Greg
On Mar 21, 10:49 am, Andrew Stromnov [EMAIL PROTECTED] wrote:
Using psyco (with full() optimization
Great that's working. And Yuck! Having to do that directly on the
cursor really makes me enjoy SA's capabilities. Can't wait until
that's a supported feature. Keep up the good work guys!
Greg
On Mar 9, 10:42 am, Michael Bayer [EMAIL PROTECTED] wrote:
you can pull raw_connection() off
function via the func
method, which also has output parameters? Are they even supported?
Function blah looks something like:
create or replace function blah( arg1 IN VARCHAR2(15), arg2 IN
INTEGER, arg3 IN INTEGER, arg4 OUT NOCOPY VARCHAR2 ) RETURN INTEGER
...
Greg
58 matches
Mail list logo