Lele Gaifax writes:
> I will study the contains_eager() alternative and try to modernize my
> code that still uses that idiom.
After reading the different sections (narrative and reference), I wonder
if there is a case where the joinedload() has some advantage over
contains
erred to share code snippets)
Sorry, note taken.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
SQLAlchemy -
The Pytho
der_by() normally, then
> use contains_eager().
Oh, thanks a lot for this!. Accordingly with the git history, I
introduced that test to address a deprecation warning issued by SA 1.4+
load_only()...
I will study the contains_eager() alternative and try to modernize my
code that still uses th
firstname', String(), table=)
Can you shed some light on what I can try to smooth this different
behaviour?
Thanks a lot in advance,
bye, lele.
[1] https://gitlab.com/metapensiero/metapensiero.sqlalchemy.proxy
[2]
https://gitlab.com/metapensiero/metapensiero.sqlalchemy.proxy/-/blob/8
"Mike Bayer" writes:
> On Fri, Apr 14, 2023, at 8:03 AM, Lele Gaifax wrote:
>> I now have
>>
>> CREATE TABLE something (id SERIAL, name TEXT)
>>
>> CREATE FUNCTION counter(something)
>> RETURNS INTEGER AS $$
>> SELECT count(*) FROM
he value [assigned to the column] will be ignored", so that does
not bring me any advantage.
On the ORM side, I could "hide" the concrete column and expose it thru a
readonly property, but I'd like to have a similar safety-belt also at
the Core layer, because many services/APIs w
q.limit(3).all()])
and emits
[('2° Torneo', datetime.date(2001, 4, 1)),
('7° Torneo', datetime.date(2004, 4, 24)),
('7° Torneo', datetime.date(2005, 4, 30))]
Hope this helps,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincer
unc.strftime('%m', func.date(Events.date_of_event) ==
> datetime.today().strftime('%m'))
You are passing a boolean value to the strftime() function, and that's
not what you probably meant/want.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gai
"Mike Bayer" writes:
> On Thu, Feb 16, 2023, at 7:16 AM, Lele Gaifax wrote:
>>
>> TL;DR
>>
>> Why is the sqlalchemy.ext.hybrid.Comparator.property explicitly
>> raising a NotImplementedError?
>
> the .property attribute in the base PropCom
etermine whether it should assign a scalar value
or an instance to the target.
In SA 2, the ext.hybrid.Comparator explicitly[6] defines the
"property" property as "not defined" (sorry for the pun), and I could
not figure out the rationale.
While I keep digging and trying, ma
equirements/base.txt).
I'm testing against a copy of the production DB, but it actually does
not make any difference, as the same happens with an empty development
db.
Thanks, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò a
"Mike Bayer" writes:
> There's a few things going on here, and I can see the code here in
> your "master" branch at least hasn't been updated for 2.0.
See https://gitlab.com/metapensiero/SoL/-/commits/sol5
bye, lele.
--
nickname: Lele Gaifax | Quando vivrò di quell
ing current state and pushing it right now.
>
Will be back on your other remarks later.
Thanks, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortuna
gine.Engine: [raw sql] ()
16:56:36 [I] sqlalchemy.engine.Engine: ROLLBACK
Traceback (most recent call last):
File "/home/lele/wip/sol5/env/bin/soladmin", line 33, in
sys.exit(load_entry_point('SoL', 'console_scripts', 'soladmin')())
^
figure(
connection=connection, target_metadata=target_metadata
)
with context.begin_transaction():
context.run_migrations()
As this unconditionally affects all migrations, it obviously may ruins
further ones, where the FK check would be desiderable.
Can you suggest some
lembic in this
project (ten years, omg!), but even modernizing it using Alembic 1.9.2
template didn't help: when the connection is closed, either explicitly
by the old try:finally: code or implicitly by the new
connectable.connect() context manager, a ROLLBACK is issued.
Do you have an hint
tps://docs.sqlalchemy.org/en/14/dialects/sqlite.html#connect-strings,
that syntax is equivalent to sqlite://:memory:, and thus there is no
file involved.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi
"Mike Bayer" writes:
> there should definitely be an "isempty" accessor, but from SQLA's
> naming conventions we prefer to have "is_empty" as the official name.
> There's a bunch of precedent for this. overall people should be able
> to use either
py:
is_false(bool(Range(empty=True)))
test/dialect/postgresql/test_types.py:eq_(data,
[(self._data_obj().__class__(empty=True),)])
test/dialect/postgresql/test_types.py:eq_(data,
[(self._data_obj().__class__(empty=True),)])
thanks, lele.
--
nickname: Lele Gaifax | Quand
"Mike Bayer" writes:
> On Thu, Dec 1, 2022, at 1:01 PM, Lele Gaifax wrote:
>> Wrt "empty", what's your preference, leaving it as is and expose a
>> "isempty" property or rename the attribute to "isempty" (and possibly)
>&g
"Mike Bayer" writes:
> On Wed, Nov 30, 2022, at 2:31 PM, Lele Gaifax wrote:
>> "Mike Bayer" writes:
>>
>> > On Wed, Nov 30, 2022, at 10:30 AM, Lele Gaifax wrote:
>> >>
>> >> - "empty" vs "isempty": both
"Mike Bayer" writes:
> On Wed, Nov 30, 2022, at 10:30 AM, Lele Gaifax wrote:
>> On the former one, it would be nice if we could reduce the "distance"
>> between the new Range class and what popular drivers provide:
>>
>> - "empty&quo
ecent improvements to the Range
class, to be able to determine a "discrete step" for each of them.
So I wonder if it would be reasonable/doable/affordable if SA could grow
a "family" of classes, derived from current Range, one for each data
type, so that for example a D
direct cause of the following exception:
Traceback (most recent call last):
File "/home/lele/wip/etour/ndn/hopi/next/tmp/sa_range_contains/test.py",
line 49, in
tusage = session.execute(
File "/nix/.../sqlalchemy/orm/session.py", line 2081, in execute
e-orm.com/en/latest/peewee/playhouse.html#pwiz
for Peewee.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
SQLAlchemy
cation period
in https://github.com/python/cpython/pull/28618, replaced by FullArgSpec.
Reasonably this should be reported to sqlacodegen team.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di
m the connection.dialect.
But hey, I do not expected those arguments will be changing often... :-)
ciao, lele
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortun
manually coded those values.
For that reason I didn't (yet) created an issue and proposed a PR.
Mike, can you tell me if this is acceptable or how can I improve it?
Thanks, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di
Lele Gaifax writes:
> I will propose a PR soon.
An ethical concern: given that the proposed methods are so simple, is it
legal/acceptable to verbatim copy them, and their tests, from the
psycopg (LGPL) and asyncpg (Apache license)?
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di que
directly. I would just disagree with
> psycopg2's more nonsensical methods like `__lt__`, `__gt__`, etc.
>
Thank you for the directions: while I'm not 100% convinced about
avoiding __contains__(), which seems very intuitive and practical, I
will propose a PR soon.
ciao, lele.
--
nickname: Lele
return self.active and date.today() in self.validity
to something different, that in some way "reaches" the underlying
psycopg (say) implementation and uses its logic?
Thanks in advance,
ciao, lele.
--
nickname: Lele Gaifax | Dire che Emacs è "conveniente" è come
rea
"chunks"
generated by common functions, used in several other places.
It would be very impractical to carry around the whole set of "parameters" and
use the implicit/automatic injection made by SA.
Thanks again,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho p
uld do... but given that the above idiom has
worked well for me for so long, this may very well be an unintended
side effect of
https://github.com/sqlalchemy/sqlalchemy/commit/63191fbef63ebfbf57e7b66bd6529305fc62c605.
Thank you for any hint,
ciao, lele.
--
nickname: Lele Gaifax | Dire che Ema
on.
I think a full traceback could help in diagnosing the problem.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
SQLAlchemy -
lter_group`
with something like
attr = getattr(self.model_class, col)
filter_group.append(attr.in_(tuple(kwargs['query_params'][col])))
that is, obtain the mapped class member named after "col", and use that to
build the filter expression.
ciao, lele.
--
nickname: Lele Gaifax | Qua
"Mike Bayer" writes:
> On Sat, Jul 24, 2021, at 5:49 AM, Lele Gaifax wrote:
>> Hi all,
>>
>> I need some clarification on the following RemovedIn20Warning
>>
>> "Pet" object is being merged into a Session along the backref cascade path
&
guring all the "one-to-many" relationships as
"viewonly", but that again would require more analysis on the code paths...
So, am I missing something and there is some recommended alternative, or
should I dig into the rabbit's hole?
Thanks in advance for any hint,
ciao, lele.
--
SQL
Federico Caselli writes:
> Updated here https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/2959
Great, thank you!
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero
Federico Caselli writes:
> There is no difference, it's the documentation that's outdated.
>
> We should update that
I see, thank you for the clarification!
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver pau
tached to the generic load_only()
function documentation uses the string name.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
SQLA
the
problem. Maybe using joinedload(X.y).load_only(a, b), a and b cannot be column
names under 2.0, but should be Y.a and Y.b instead?
Thanks a lot for any hint,
ciao, lele.
[1]
https://docs.sqlalchemy.org/en/14/orm/query.html#sqlalchemy.orm.Load.load_only
--
SQLAlchemy -
The Python SQL Toolkit
"Mike Bayer" writes:
> I pushed the fix for that, give it another go. this is good testing you're
> doing as you have a lot of SQL Core metaprogramming going on. things are
> REALLY different on the inside :)
Great, thanks again Mike: this indeed fixed my test
"Mike Bayer" writes:
> Hi Lele -
>
> It looks like .froms on a simple select() that is against ORM entities is
> just broken here, so
> we can fix that. at the moment it's a one liner but there are some
> performance implications
> that might make it more tri
erson.lastname])
.filter(or_(Person.firstname.like('%Lele'),
Person.lastname.like('%Lele')))
given an entity, "Person", a string to search and a subset of the columns that
shall be considered and extracted.
So, this is the test [4]:
def test_query():
proxy
going.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
"Mike Bayer" writes:
> On Tue, Nov 5, 2019, at 4:08 AM, Lele Gaifax wrote:
>> Hi all,
>>
>> I'm almost sure I'm missing the obvious, struggling to understand how to use
>> a
>> CTE with a PG "upsert" statement: I need to modify an exist
nt =
(some_sales.amount * %(amount_2)s)
==
Can anybody shed some light on what I'm doing wrong?
Thanks in advance,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it
info is one place. sorry there is not a better solution.
Thank you Mike,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
SQL
columns, and then check for that,
but I wonder if there is an less intrusive way... knowing and loving SA I bet
there is and it's just a matter of pronouncing the right incantation :-)
Thank you in advance for any hint,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real:
ot; lookup, be it either by string or by integer
b) "iterative"/"nested" lookup, one hop at a time over the provided sequence
But maybe I'm missing some detail on the "engine specific" implementations,
where, say, "foo['string']" may be considered a very diff
as in
::
data_table.c.data['some key']
or positional/by integer::
data_table.c.data[3]
* Path index operations::
data_table.c.data[('key_1', 'key_2', 5, ..., 'key_n')]
or is it just a s/two operations/three operations/ ?
Thanks, lele.
--
nickname: Lele Gaifax | Quando vivrò di
o work at the core layer...), and wasn't sure about it being an error on my
configuration.
> If these columns have a server side behavior for INSERT then you'd also add
> server_default=FetchedValue() and then you wouldn't see the None on INSERT.
Thank you,
ciao, lele.
--
nickname: Lele Gaifax |
oop above exits
db.session.commit()
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
SQLAlchemy -
The Python S
Tom Tanner <dontsendemailher...@gmail.com> writes:
> Lele, could you write the code showing how that would look? Thanks.
Extending Mike's answer:
from sqlalchemy.orm import make_transient
make_transient(someObj) # someObj is no longer in the session
del s
) of the cloned object.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
SQLAlchemy -
The Python SQL Toolkit and Object R
mike bayer <mike...@zzzcomputing.com> writes:
> yeah IMO this is a bug in asyncpg but of course your custom dialect can work
> around that.
Ok, thank you.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver pau
Lele Gaifax <l...@metapensiero.it> writes:
> I bet because it does want to fiddle with the SQL statement parsing, or with
> the formatting of parameter's values.
ops: ... it does *not* want...
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
re
Mike Bayer <clas...@zzzcomputing.com> writes:
> Right. So why can't asyncpg do that.
I bet because it does want to fiddle with the SQL statement parsing, or with
the formatting of parameter's values.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato
is
SELECT users.id
FROM users
WHERE users.name = 'myself' AND (users.active @> '2017-04-14'::date)
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- F
as not clear that I was suggesting
an enhancement, not a fix :-).
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
SQLAlchemy -
m():
Yes, I know, but since I need to tweak the representation of positional
parameters (that is, $1 instead of :1), I had to touch the BIND_TEMPLATES
content. That's why I thought a more generic approach of allowing an
arbitrary, user controlled way to render the placeholders could be better.
ciao,
rs.validity @> $2::DATE)
Since it eventually boils down to overriding a single "private" method
(_apply_numbered_params), I wonder if it would be a welcome addition to
standard SA, maybe allowing to set "paramstyle" to an user's arbitrary
callable.
What do you think?
Thank you
does not reference the correct column but the whole
table.
Also, I'd try to find a better way to pass the parameter, possibly without
transforming it into a string with isoformat().
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad
pi/pgspecial, used for example by pgcli, a
Python-based alternative to psql.
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
SQLAlchemy
Simon King <si...@simonking.org.uk> writes:
> There are a few examples of different ways of doing this at
> http://docs.sqlalchemy.org/en/latest/orm/examples.html#module-examples.generic_associations.
Excellent, thank you for pointing me there!
bye, lele.
--
nickname: Lele Gai
:
newaddr = Address(street='somewhere')
person.addresses.append(newaddr)
so I have to do this instead::
newaddr = Address(street='somewhere', attached_kind='Person',
attached_id=person.id)
Is there any trick hidden somewhere, or do I need a add_address() method on
each entity?
Thank you for any hint,
ciao,
iation-object
> ).
Thank you for the link.
> You *might* be able to fix this by setting the cascade behaviour on
> Person.preferred_activities to "all, delete-orphan":
Will try that approach. My current workaround is to explicitly delete the
intermediary items before deleting th
out errors
person = relationship(Person, backref='preferred_activities')
def main():
engine = create_engine('sqlite:///:memory:', echo=True)
Session = sessionmaker(bind=engine)
sess = Session()
Base.metadata.create_all(engine)
person = Person(id=1, name='lele')
activ
Mike Bayer <mike...@zzzcomputing.com> writes:
> reinstate the whole thing in 516a442f233d90eb7b8bb844e2dea7865bb21f66...
Ok, see https://github.com/zzzeek/sqlalchemy/pull/231
thank you,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanue
Mike Bayer <mike...@zzzcomputing.com> writes:
> On 01/27/2016 05:32 AM, Lele Gaifax wrote:
>> Here is the diff implementing the third option: it still need to touch also
>> the C implementation, because that does not use the metadata keymap when the
>> key is an integer
Lele Gaifax <l...@metapensiero.it> writes:
> Let me know how you prefer me going forward: I can easily try out your (now
> reverted) change, but it's up to you.
The following patch:
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy"
speedups:
$ py.test test/
platform linux -- Python 3.5.1+, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 --
/home/lele/wip/sqlalchemy/env/bin/python3
cachedir: .cache
rootdir: /home/lele/wip/sqlalchemy, inifile: setup.cfg
collected 7556 items
test/aaa_profiling/test_compiler.py::CompileTest_
undant index
computation under Py2).
Thank you,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
You received this message becaus
ires.cextensions: how can I
exercise both implementations (that is, C and pure Python)?
Thanks for any feedback,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it |
Mike Bayer <mike...@zzzcomputing.com> writes:
> On 01/24/2016 11:11 AM, Lele Gaifax wrote:
>> I wonder whether there is an underlying reason or if it's just an oversight.
>
> both? the rowproxy is addressable by lots of things like strings,
> Column objects. if we wa
pure Python
version) class or into the ResultMetaData._key_fallback() method?
Thank you,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato De
Mike Bayer <mike...@zzzcomputing.com> writes:
> The column_reflect event supports this - you can populate the info
> dictionary right there from information that you get out of the
> col_description system view.
Thank you Mike,
as always, you (and consequently SQLAlchemy) shi
w me to fetch such extra
information for each column. It seems that the `Inspector.get_columns()`
declares an "attrs" slot, carrying "optional column attributes", but no
dialect uses it AFAICT.
I could of course tweak/monkey patch the `PGDialect.get_columns()`, but I
wond
rjoin(pad, sa.text('true')))
it instead emits the right SQL, that is:
SELECT p.id, p.description, p.idkind, pad.price AS price, pad.discount AS
discount
FROM products AS p LEFT OUTER JOIN price_and_discount(p.id, %(idcustomer)s)
AS pad ON true
So, is there a "correct way" to dynamicall
non-blocking
> operations too.
In the very same context, I'm using a port of the twisted-based Alchimia to
asyncio: https://gitlab.com/arstecnica/arstecnica.sqlalchemy.async
It only works at the core level of SA, though.
hth, ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho
be catched anyway, either by fixing the driver (cymysql)
or SA itself.
Thank you,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929
never be None if an
UPDATE/DELETE were emitted in any case. bug is with cymysql.
Ok, I will switch to PyMySQL, if it passes all my current tests.
Hopefully I won't loose too much performance and meet other kind of
glitches... I'm looking forward to use a better DB!
Thank you,
bye, lele
(replace_lang(stmt, 'it'))
pca = products.alias().c
stmt = select([
pca.en.label('description'), pca.en_note.label('summary')
])
print(replace_lang(stmt, 'it'))
Is it reasonable, or does the table.original trick fall short in corner
cases?
Thanks a lot,
ciao, lele.
--
nickname
to get there, or other approaches I missed?
Thanks a lot,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
You received
Mike Bayer mike...@zzzcomputing.com writes:
On 6/30/15 6:56 PM, Lele Gaifax wrote:
With the approach above custom column types used by the new_table are not
playing their magic, and I currently must repeat it within the adapt()
function.
I assume you mean the data you're getting back from
an insert using its ORM layer, so that I can
simplify the adapt() function applying the DRY principle?
Thank you in advance for any hints,
bye, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l
is written to permanent storage).
hth, ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
You received this message because you
please point me in the right direction?
Thanks in advance,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
You received
statement I used is more like
event.listen(MyModel.__table__, after_create,
DDL(CREATE UNIQUE INDEX model_c1_vs_c2
ON model (id, idc1, idc2)
WHERE flag=0))
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele
Michael Bayer mike...@zzzcomputing.com writes:
SQLAlchemy release 0.9.0 is now available.
Happy new year!
Hurrah! Thank you Mike, I'll surely address a Brindisi[1] to you
tonight. I used the 0.9 series since its inception basically without a
single glitch. You (and SA) rock!
ciao, lele.
[1
the not recommended idiom of *redefining* a symbol in that
way, you should import/define the session maker function from
somewhere before you can use it.
As said, I'd recommend using different names, to avoid confusion, for
example
session = SessionMaker()
hth, ciao, lele.
--
nickname: Lele Gaifax
yet to show the proper SA
syntax :)
hth,
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
You received this message because you
the reference to the
recipe, I assume you are asking whether you can map a view onto a
Python class using the declarative layer. If so, yes, SQLAlchemy does
not care about how the underlying table is implemented, it will issue
the same SQL in either cases.
ciao, lele.
--
nickname: Lele Gaifax
, ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it | -- Fortunato Depero, 1929.
--
You received this message because you are subscribed to the Google Groups
(a DAG, introduced by script's metadata) (thanks to
Michael's topological sort, btw!) and execute the missing one on a
target database. Double value: good documentation, and automatic upgrade
of custom's databases.
It's GPL, just ask if interested!
ciao, lele.
--
nickname: Lele Gaifax| Quando
a _raw_columns, or _froms, but it does not
seem a clean approach. What am I missing?
Thanks in advance for any hint,
ciao, lele.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To post to this group, send
-generated value (they
are effectively overwritten by a database trigger, at insert/update
time), possibly without resorting to marking them defer on each
mapped entity... Any magical shortcut to achieve that? :-)
hth,
ciao, lele.
--
nickname: Lele Gaifax| Quando vivrò di quello che ho pensato ieri
/UsageRecipes/AutoCode (but
note that the current version is not the one attached to the page, but
rather lives in a repository on code.google.com).
ciao, lele.
--
nickname: Lele Gaifax| Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas| comincerò ad aver paura di chi mi copia
On Fri, 18 Apr 2008 01:06:41 -0700 (PDT)
Vortexmind [EMAIL PROTECTED] wrote:
On 17 Apr, 18:10, Lele Gaifax [EMAIL PROTECTED] wrote:
On Thu, 17 Apr 2008 07:40:02 -0700 (PDT)
Either get the trunk of autocode, ...
I tried, but http://sqlautocode.googlecode.com/svn/trunk/ grabs the
0.3 SA
)
...
cross = CrossObj(id=1, index=1)
cross.ref = session.query(RefObj).get(1)
newobj.other_objs.append(cross)
What am I missing?
Thanks in advance,
ciao, lele.
--
nickname: Lele Gaifax| Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas| comincerò ad aver paura di
1 - 100 of 125 matches
Mail list logo