Hello.
I am trying to adapt WindowedRangeQuery recipe
http://www.sqlalchemy.org/trac/wiki/UsageRecipes/WindowedRangeQuery
I have just stumbled upon the following issue:
def _q_windows(self, window_size):
q = self._query.with_entities(
self._column,
As far as I can tell that is just for setting the time. By the linked
documentation, using server_default.
Postgres stores all datetimes as UTC and then does the conversion on query,
depending on the timezone set in the connection. This defaults to the
computer's timezone.
In my submission it
Hello.
I have already solved the issue by using subquery:
SELECT
t.id AS t_id,
t.rownum AS t_rownum
FROM (
SELECT
FROM
foo.id AS id,
row_number() OVER (ORDER BY foo.id) AS rownum
) AS t
WHERE rownum % 50 = 1
I have just tried your suggestion about using HAVING
On Tue, Jun 4, 2013 at 5:26 PM, Claudio Freire klaussfre...@gmail.com wrote:
On Sun, Jun 2, 2013 at 9:41 PM, Claudio Freire klaussfre...@gmail.com
wrote:
So the whole thing is rolled up into the named thing I referred to
also, so that there's no need to keep a Query object hanging around,
On Jun 6, 2013, at 1:03 PM, Claudio Freire klaussfre...@gmail.com wrote:
On Tue, Jun 4, 2013 at 5:26 PM, Claudio Freire klaussfre...@gmail.com wrote:
On Sun, Jun 2, 2013 at 9:41 PM, Claudio Freire klaussfre...@gmail.com
wrote:
So the whole thing is rolled up into the named thing I referred
On Jun 6, 2013, at 12:56 PM, Ladislav Lenart lenart...@volny.cz wrote:
Hello.
I have already solved the issue by using subquery:
SELECT
t.id AS t_id,
t.rownum AS t_rownum
FROM (
SELECT
FROM
foo.id AS id,
row_number() OVER (ORDER BY foo.id) AS rownum
) AS
Am 06.06.2013, 18:56 Uhr, schrieb Ladislav Lenart lenart...@volny.cz:
Hello.
I have already solved the issue by using subquery:
SELECT
t.id AS t_id,
t.rownum AS t_rownum
FROM (
SELECT
FROM
foo.id AS id,
row_number() OVER (ORDER BY foo.id) AS rownum
) AS t
WHERE
I will show you a short program that you can use to experiment with the Pyodbc
connector - the purpose of this program is to illustrate what SQLAlchemy will
send to pyodbc.connect():
from sqlalchemy.connectors import pyodbc
from sqlalchemy.engine.url import make_url
conn =
I've written a handful of primaryjoin and secondaryjoin attributes on
Relationships. This mechanism is flexible, but it's error-prone, and I
think that, at least for all the cases I've personally encountered, there
could be a better way. As an example, I have:
thing = Table('thing',
On Jun 6, 2013, at 2:21 PM, Andy aml...@gmail.com wrote:
I've written a handful of primaryjoin and secondaryjoin attributes on
Relationships. This mechanism is flexible, but it's error-prone, and I think
that, at least for all the cases I've personally encountered, there could be
a
On Jun 6, 2013, at 3:21 PM, Michael Bayer mike...@zzzcomputing.com wrote:
Not only that, but we are now placing ORM-specific configuration into our
Table metadata. What's wrong with doing it in relationship()?Clearly,
the way primaryjoin works, in that it's an expression, is
Am 06.06.2013, 20:21 Uhr, schrieb Andy aml...@gmail.com:
IOW I have things and groups. The rel table is a many-to-many relation
between things and groups. A thing also may have a favorite group; if
so,
there has to be a rel between that thing and its favorite group.
Are favourites
On Jun 6, 2013, at 5:18 PM, Charlie Clark charlie.cl...@clark-consulting.eu
wrote:
Am 06.06.2013, 20:21 Uhr, schrieb Andy aml...@gmail.com:
IOW I have things and groups. The rel table is a many-to-many relation
between things and groups. A thing also may have a favorite group; if so,
Am 06.06.2013, 23:36 Uhr, schrieb Michael Bayer mike...@zzzcomputing.com:
On Jun 6, 2013, at 5:18 PM, Charlie Clark
charlie.cl...@clark-consulting.eu wrote:
Am 06.06.2013, 20:21 Uhr, schrieb Andy aml...@gmail.com:
IOW I have things and groups. The rel table is a many-to-many relation
On Jun 6, 2013, at 5:40 PM, Charlie Clark charlie.cl...@clark-consulting.eu
wrote:
Am 06.06.2013, 23:36 Uhr, schrieb Michael Bayer mike...@zzzcomputing.com:
On Jun 6, 2013, at 5:18 PM, Charlie Clark
charlie.cl...@clark-consulting.eu wrote:
Am 06.06.2013, 20:21 Uhr, schrieb Andy
On Thursday, June 6, 2013 2:40:57 PM UTC-7, Charlie Clark wrote:
Am 06.06.2013, 23:36 Uhr, schrieb Michael Bayer
mik...@zzzcomputing.comjavascript::
On Jun 6, 2013, at 5:18 PM, Charlie Clark
charli...@clark-consulting.eu javascript: wrote:
Am 06.06.2013, 20:21 Uhr, schrieb
Function names in SQL can contain pretty much anything, e.g.:
=# create function A Bug?(integer) returns integer as $$ select $1; $$
language sql;
CREATE FUNCTION
But when attempting to use the function from SQLAlchemy:
from sqlalchemy.sql.expression import func
bug = getattr(func, A Bug?)(1)
17 matches
Mail list logo