Hi,
I am working on a date range query, in the FaunaDB shell the query is working, but the same query in python API not working, can help me to resolve the issue. For more information, I have attached the error message.
Shell Query
Map(
Paginate(
Range(
Match(Index(“apsec_start_range_users”), “tilak@email.com”),
ToTime(Date(“2020-07-14”)),
ToTime(Date(“2021-01-01”))
)
),
Lambda(
[“start”,“ref”],
Update(
Var(“ref”),
{data: {date:ToDate(Var(“start”))}}
)
)
)
Python Code
result = client.query(
q.map_(
q.paginate(
q.range(
q.match(
q.index(“apsec_start_range_users”), “tilak@email.com”
),
q.to_time(q.date(“2020-07-14”)),
q.to_time(q.date(“2021-01-01”))
)
),
q.lambda_(
[“start”, “ref”],
q.update(
q.var(“ref”),
{“data”: {“date”: q.to_date(q.var(“start”))}}
)
)
)
)
Error Message
Thanks