Hi there, I'm trying to do with Microsoft SQL Server what this snippet: https://docs.sqlalchemy.org/en/13/core/custom_types.html#types-sql-value-processing does for PostGIS.
Unfortunately in MSSQL "ST_GeomFromText" does not exist in the default function namespace, but is a static method of the geography type and is expected to be called as geography::STGeomFromText (see: https://docs.microsoft.com/en-us/sql/t-sql/spatial-geography/stgeomfromtext-geography-data-type?view=sql-server-ver15) I tried several things in "bind_expression" but didn't manage to get sqlalchemy to compile anything into "geography::STGeomFromText". When using "func.geography.STGeomFromText" this is ends up in SQL with a plain "." as a separation. All attempts at injecting the double colons literally failed because the prefix is then wrapped in quotes. Am I missing something here or do I have to (e.g.) use a custom dialect for that? Thanks & cheers Sebastian -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/37eb37ce-92e8-4eb4-b880-75aa86dfdbb7%40googlegroups.com.
