I posted a recipe for splitting multiple fields (by byte range) out of single
table columns at https://gist.github.com/1263055 .
I have to interact with some legacy tables that aren't remotely closed to being
1NF. This lets me treat byte ranges without those columns as separate columns
so I
On Sep 28, 2011, at 9:45 AM, Michael Bayer wrote:
Also, there are type-based validations, fine, string, numeric, integer,
dates, including length of strings. If someone throws on postgresql.INET,
not really, unless the contract of TypeEngine objects is extended such that
they *all* get
Does SA natively support (or is there a module on PyPI that supports)
client-side validation of SQLAlchemy objects? For example, I have this
declarative class:
class ImportedPayment(Base):
__tablename__ = 'importedpayment'
__table_args = {'schema': 'public'}
Given a largish file with a lot of table definitions in it, and
SQLAlchemy 0.5.7, how can I see what SQL would be generated to create
one specific table on a PostgreSQL database without actually attempting
to create the table?
--
Kirk Strauser
--
You received this message because you
in the
general case. For example, I might've wanted something like:
@comparable_using(substrcomparatormaker(typeofinv, 0, 3))
@property
def shiptype(self):
The shipment's type
return {'FOO': 'Foo invoice', 'BAR': 'Bar invoice'}[self.typeofinv[:3]]
--
Kirk Strauser
(Customer.xrscustid==BillingInfo.xrscustid
)))
Michael, a million thanks. Seriously. That did exactly what I needed, and
should handle a bunch of similar issues with other legacy tables. I appreciate
it!
--
Kirk Strauser
--~--~-~--~~~---~--~~
You received this message
On Friday 31 July 2009 08:30:52 am Kirk Strauser wrote:
On Thursday 30 July 2009 04:26:20 pm Michael Bayer wrote:
you have to get the select() syntax right:
BillingInfo = relation('BillingInfo',
primaryjoin=and_(Invoice.pay2addrid==BillingInfo.pay2addrid,Invoice.cust
om er
' has no
property '_deannotate'
I think I'm going to put this on pause and take another look after I get
back from vacation and my neurotransmitters are replenished. :-)
--
Kirk Strauser
--~--~-~--~~~---~--~~
You received this message because you are subscribed
saved screenfuls of SQL by converting to SA.
--
Kirk Strauser
--~--~-~--~~~---~--~~
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
and Integer
references to the Customer table. This whole mess is based on data that are
copied from Visual FoxPro tables on an hourly basis, and all new code is
written to query PostgreSQL instead of VFP.
--
Kirk Strauser
--~--~-~--~~~---~--~~
You received
/dist-packages/sqlalchemy/sql/expression.py,
line 3239, in __init__
[_literal_as_column(c) for c in columns]
TypeError: 'Column' object is not iterable
Any idea where I might start digging into that?
--
Kirk Strauser
--~--~-~--~~~---~--~~
You received
? If not, is there an
idiomatic approach for this? Thanks!
--
Kirk Strauser
--~--~-~--~~~---~--~~
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
enforcing
main.childid=child.childid. Is there another way I should be approaching
this?
--
Kirk Strauser
signature.asc
Description: This is a digitally signed message part.
, 'literal': 'BILLGSCB',
'rdy2bill_invid': 1000346504, 'substr_1': 4}
The killer part is the (substring(rdy2bill.xmlvars, %(substring)s)
AS groupcode = in the WHERE clause. PostgreSQL apparently doesn't
want that predicate to be named. Can that be disabled?
--
Kirk Strauser
to be called once instead
of twice).
Fair enough. But then, is there something else I can do to get it to
emit PostgreSQL-compatible SQL?
--
Kirk Strauser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On May 3, 2007, at 5:31 PM, Michael Bayer wrote:
no wait, scratch my last email for a bit. try rev 2601.
Perfect! That was exactly what it needed.
I have to say that after using SQLAlchemy for about a week, I'm
really excited about this.
--
Kirk Strauser
* from invoice where substr(invnum,1,4) = 'FOOI';
I've tried to RTFM, but I'm really a beginner with it and don't even know
what to search for yet.
--
Kirk Strauser
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
17 matches
Mail list logo