On Apr 15, 7:03 am, bool wrote:
> Given an Update(or Insert) object how can I find the columns being
> updated (or Inserted).
> I dont find any function that gives these?
>
> t = Table("abc", MetaData(conn), Column("x", String), Column("y",
> Integer))
> u = t.update().values(x='a')
>
> # Now I wa
On Apr 15, 11:55 am, Michael Trier wrote:
> > Given an Update(or Insert) object how can I find the columns being
> > updated (or Inserted).
> > I dont find any function that gives these?
>
> The attributes.get_history method will return this information to you as a
> History record for each attrib
On Oct 15, 11:50 pm, Jeff Cook wrote:
>
> So, SQLAlchemy is doing something here. There probably is some
> incorrect code in my program, which is why I am writing this list, to
> figure out what that is. I'm an experienced developer and I don't
> appreciate your disrespect. I can follow tutorials
Rick,
On Tue, Dec 23, 2008 at 10:32 AM, Rick Morrison wrote:
> I've got a few concerns with the just-committed get_default_schema_name()
> approach:
>
> 1) What about pre-2005 users? The query used in this patch to fetch the
> schema name won't work. There was not even a real hard concept of 'sc
On Mon, Dec 22, 2008 at 10:45 PM, Empty wrote:
> On Mon, Dec 22, 2008 at 10:00 PM, Randall Smith wrote:
>
>>
>> Michael Bayer wrote:
>>
>> >> Shouldn't mssql do something similar to Postgres here?
>> >
>> > it certainly should.
On Mon, Dec 22, 2008 at 10:00 PM, Randall Smith wrote:
>
> Michael Bayer wrote:
>
> >> Shouldn't mssql do something similar to Postgres here?
> >
> > it certainly should.
> >
>
> Ticket 1258
>
Nice. Thank you very much.
Michael
--~--~-~--~~~---~--~~
You received
On Mon, Dec 22, 2008 at 8:46 PM, Empty wrote:
>
>> On Dec 22, 2008, at 6:36 PM, Randall Smith wrote:
>>
>> >
>> > Michael Bayer wrote:
>> >> just FTR, the current expected behavior of default schemas is that if
>> >> your tables are kno
>
>
> On Dec 22, 2008, at 6:36 PM, Randall Smith wrote:
>
> >
> > Michael Bayer wrote:
> >> just FTR, the current expected behavior of default schemas is that if
> >> your tables are known to exist in the default schema configured on
> >> the
> >> database connection, you leave the "schema" attribu
Hi,
On Thu, Dec 11, 2008 at 8:12 AM, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:
>
> Hi
> I've scoured the documentation and i can't find any info on how to
> create a column using metadata.
>
> from sqlalchemy import engine
> from sqlalchemy import schema
> from sqlalchemy import types
>
> _co
Hello,
On Tue, Dec 9, 2008 at 9:19 AM, Keyton Weissinger <[EMAIL PROTECTED]> wrote:
>
> Greetings all.
>
> I'm new to sqlalchemy and would REALLY like to use it at my office.
> I'm looking for examples and having a HECK of a time.
> 1. Running Python 2.5.2 on Windows XP.
> 2. Connecting to a loca
> Column('last_updated', DateTime, PassiveDefault(func.current_timestamp
> ()), onupdate=func.current_timestamp())
>
> Maybe I don't understand how onupdate works.
> I would like to have this column to be changed every time the row is
> updated,
> but it doesn't work.
>
I just use something like:
> Different, but related question: How do I print out the statement in
> "copy-paste-able" format? More specifically, how do i get an ordered
> list of bound values out of the statement?
>
> This code does what I want, but it's really clunky and fragile:
>
> def print_statement(stmt):
>s = str(
en "a" and "b" column.
>
> One way to drop "b" column first then add "c" then again insert "b"
> but that is not safe (if data not empty). Is there any Query in MS SQL
> similar to MYSQL?
>
As far as I know you cannot purposefully
Hi,
On Tue, Nov 18, 2008 at 9:39 PM, TheShadow <[EMAIL PROTECTED]> wrote:
>
> All I need to be able to do is the following. (I don't need, can't
> use, and/or don't want ORM)
>
> query = 'SELECT col FROM table where col = :col'
> params = {'col':1} # and/or params = [{'col':1},{'col':2}]
> OR
> q
> there was another, which was the "ensure/insure" confusion. J Ellis
> slapped me down a long time ago on that one and I've since stopped
> selling insurance.
Found a few more and corrected.
> > You consistently spell "propagate" as
> > "propigate". Is there any way we can get an i/a swi
> > When reflecting a MSSQL table with a foreign key, the referenced table
> > fails to load with the error:
>
> > sqlalchemy.exc.NoSuchTableError: [referenced_table]
>
Give the latest trunk a try and let me know. It should have been
corrected in r5266.
Thanks,
Michael
--~--~-~--~~
There's this: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/AutoCode
Which will take the schema directly and create the classes. May not work for
you.
Michael
On Thu, Oct 30, 2008 at 12:14 PM, Michele Simionato <
[EMAIL PROTECTED]> wrote:
>
> Is there some utility to convert a schema file (o
Jon,
On Oct 27, 3:28 pm, Jon <[EMAIL PROTECTED]> wrote:
> In the docs section for MetaData, under drop_all, the following text
> appears:
>
> Defaults to True, don't issue CREATEs for tables already present
> in the target database.
>
> I think you mean s/CREATE/DROP/
This bit is corrected i
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
>
> The table has the following columns:
> id - int primary key
> DOB - varchar(25)
> ... extra columns not needed for report
>
> It's a table from legacy app that I'm a
Hello,
On Mon, Oct 20, 2008 at 10:10 AM, sandro dentella <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I think I don't see documentation on the 'match' operator that works
> differently according to db backend.
Well it kind of didn't make sense to duplicate the individual database
documentation on how
Hi,
> Is there a way to do executemany() semantic updates? Suppose I have a list
> of employee id's and I want to do something like:
>
> ids = [1, 2, 3, 4, 5, 6]
> session.execute( tbl_employees.update(tbl_employees.c.id == ids),
> tbl_employees.c.status="you're fired" )
Just us the in_ synta
Also, don't forget the match operator is available on certain
backends: sqlite, sql server, oracle, mysql, and postgres.
Michael
On Tue, Oct 14, 2008 at 1:59 PM, <[EMAIL PROTECTED]> wrote:
>
> this is somewhat frequent question, lookup the group in the past if
> anyone has something usable.
>
>
Hi,
> Yesterday I was searching this group and the SA 5.0 doc to get something
> working. Somewere I came across an option to specify the columnames to
> return
You can specify the column names as part of the query, like
session.query(User.name, User.phone).
> Filename, permissions
Hi
> Is there any chance someone can look at ticket 973?
> http://www.sqlalchemy.org/trac/ticket/973
>
> This is quite important to me, hitting the bug with a production app.
> I've got a very hacky fix, which just disables the table aliasing, but
> I don't think that's good enough to commit. I h
Hi Doug,
> I'm a new user (like this week) of SqlAlchemy and I'm trying to find
> more information about using the Declarative system. In particular I'm
> trying to build a hierarchical table with one-to-many relationships
> within the table. So if anyone knows where there might be some
> additio
Hello,
> Im using 0.4.5, is this feature only available in 0.5?
Yes, it's not available in 0.4.5. There is the predecessor _values
available in 0.4.5. It was experimental and it's behavior has changed
somewhat but will basically do the same thing.
Michael
> On Sep 16, 4:02 pm, Michael Bayer <
On Sep 11, 5:42 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> Hey list -
>
> I've just put out 0.5rc1. This release is *great*, as I am using it
> heavily every day for a project here - it's got my personal seal of
> approval. 0.5 truly rocks in general. In my particular
> applicatio
> I have created a manual and give example on how to use sqlalchemy and
> openoffice together to create documents. The code shows you how to use
> openoffice as a document template and fill in the data from the
> database. I basically use "Find and Replace" function of openoffice to
> do the "temp
Hello Felix,
> No I want to get all items from table A where no matching item in table B
> exists. I'm aware that this would be very easy if table A stores the
> foreign key.
SQLAlchemy supports the NOT EXISTS syntax through the any() / has()
methods. You should be able to do something like thi
Hi Russell,
On Sun, Jul 6, 2008 at 12:32 AM, Russell Warren
<[EMAIL PROTECTED]> wrote:
>
> I also had this issue and searched around for an answer, but found
> nothing. In my case I;m using the orm and wanted to have those object
> properties that map to a table be wrapped up in a dict. The new
Jay,
I looked at your code in detail and what I'm seeing is that the
lookups are not even getting populated. It looks like there's no
binding to an engine there, which points to a problem with your
shard_chooser.
What I would do is try to simplify it a bit. First realize that your
lookup routi
etime.now)
def __repr__(self):
return self.name
Base.metadata.create_all()
session.add_all([Category(name='zzeek'),
Category(name='jek'),
Category(name='empty')])
# order ascending
c1 = session.query(Category).order_by(asc(Category
> > i.e.
> > session.query([MappedObject.id,
> > MappedObject.name]).filter(...).all()
I actually thought of this mapping as well. Only because it seemed
consistent with select. Granted I don't understand all the reasons
why it could / could not work. That said I'm happy with value
33 matches
Mail list logo