On Tue, Apr 11, 2023, at 9:17 PM, Luis Del Rio IV wrote:
> The sql query itself returns several rows, as it should. But when trying to
> combine the max using sqlalchemy the rows return as the following.
>
> Received incompatible instance \"( 0x7f2c6cfd6670>, '2021-04-10 18',
I have some additional context on the issue Luis mentioned.
1. We are using the graphene-sqlalchemy package.
2. When you do a GraphQL web api query, the package creates a
sqlalchemy.orm.query.Query
object.
3. We want to modify this standard query that the package creates so
that
I have some additional context on the issue Luis mentioned.
1. We are using the graphene-sqlalchemy package.
2. When you do a GraphQL web api query, the package creates a
sqlalchemy.orm.query.Query
object.
3. We want to modify this standard query that the package creates so
that we
The sql query itself returns several rows, as it should. But when trying
to combine the max using sqlalchemy the rows return as the following.
Received incompatible instance \"(, '2021-04-10 18', Decimal('7294.0'))\".",
Here I am able to get the max for that row group, but am unable to pass
The sql query itself returns several rows, as it should. But when trying
to combine the max using sqlalchemy the rows return as the following.
Received incompatible instance "(server.db.models.Data object at ,
'2021-04-10 18', Decimal('7294.0'))".",
Here I am able to get the max for that
The sql query itself returns several rows, as it should. But when trying to
combine the max using sqlalchemy the rows return as the following.
Received incompatible instance \"(, '2021-04-10 18', Decimal('7294.0'))\".",
Here I am able to get the max for that row group, but am unable to
I have some additional context on the issue Luis mentioned.
1. We are using the graphene-sqlalchemy package.
2. When you do a GraphQL web api query, the package creates a
sqlalchemy.orm.query.Query
object.
3. We want to modify this standard query that the package creates so
that we
The sql query itself returns several rows, as it should. But when trying
to combine the max using sqlalchemy the rows return as the following.
Received incompatible instance \"(, '2021-04-10 18', Decimal('7294.0'))\".",
Here I am able to get the max for that row group, but am unable to
On Fri, Apr 14, 2023, at 3:02 PM, Lele Gaifax wrote:
> "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
this line of code:
query = session.query(CodigoProduto.CdChamada, Produto.IdProduto,
Produto.NmProduto, ProdutoEmpresa.VlPrecoCusto, ProdutoEmpresa.VlPrecoSugerido,
EstoqueEmpresa.DtReferencia, EstoqueEmpresa.QtEstoque)
should look like this:
query =
*I am suffering!It showed the same message.*
# Subquery para buscar o maior registro de estoqueempresa para cada produto
estoqueAtual = session.query(
EstoqueEmpresa.IdProduto,
EstoqueEmpresa.QtEstoque,
func.max(EstoqueEmpresa.DtReferencia).label('MaxDtReferencia')
"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 something_else se
>> WHERE se.something_id = $1.id
the initial issue is that you want DtReferencia from the subquery on the
outside:
session.query(..., estoqueAtual.c.DtReferencia, ...)
and not "EstoqueEmpresa.DtReferencia", that's not available in the FROM list,
it's inside a subquery.
also I dont think you'd want to "group by" the same
Good afternoon.
I am having trouble transforming a SQL Server query to SQL Alchemy.
*The SQL Server query is this*
SELECT CP.CdChamada, P.NmProduto, PE.VlPrecoCusto, PE.VlPrecoSugerido,
EE.QtEstoque, EE.DtReferencia
FROM Produto P
INNER JOIN Produto_Empresa PE ON P.IdProduto = PE.IdProduto
On Fri, Apr 14, 2023, at 8:03 AM, Lele Gaifax wrote:
> Hi,
>
> I wonder if there is a way to declare a particular column of a table as
> "readonly", either for the purpose of documenting the model, or to get
> early error should someone try to update it.
"readonly" can mean a few different
Hi,
I wonder if there is a way to declare a particular column of a table as
"readonly", either for the purpose of documenting the model, or to get
early error should someone try to update it.
Some context: I have to maintain an old application, based on
PostgreSQL, with several surrounding tools
16 matches
Mail list logo