What's the proper syntax for doing a bulk upsert using the new
on_conflict_do_update clause? In postgres there is apparently a special
table called 'excluded' which contains all the rows to be inserted, so the
raw query looks like this:
INSERT into MYTABLE(col1,col2,col3) VALUES (a,b,c),(d,e,f
This is a perfectly usable solution. Thanks so much!
On Wednesday, September 16, 2015 at 11:39:57 AM UTC-7, Michael Bayer wrote:
>
> OK, new day, new perspectives. This is the best way to do the mapping /
> type:
>
> class CastToIntegerType(TypeDecorator):
> impl = String
>
> def c
eaner
way to do this?
Thanks!
On Tuesday, September 15, 2015 at 10:49:51 AM UTC-7, Michael Bayer wrote:
>
>
>
> On 9/15/15 1:19 PM, Katie Wurman wrote:
>
> Hi,
>
> I'm having trouble implementing a model whose 'id' column needs to be cast
> to Integer
Hi,
I'm having trouble implementing a model whose 'id' column needs to be cast
to Integer type. Below is the implementation I've got so far:
class CastToIntegerType(types.TypeDecorator):
'''
Converts stored String values to Integer via CAST operation
'''
impl = types.Numeric
, Michael Bayer wrote:
>
>
>
> Katie Wurman > wrote:
>
> > I’m trying to design an application that has several engines and unique
> models associated with each engine.
> >
> > Ideally, I’d like to create one base/abstract model per engine, set the
>
I’m trying to design an application that has several engines and unique
models associated with each engine.
Ideally, I’d like to create one base/abstract model per engine, set the
bind for those, and have all child models inherit that bind. Unfortunately
I can’t seem to figure out how that wou