Skip to content

Conversation

sharkAndshark
Copy link
Contributor

No description provided.

@sharkAndshark sharkAndshark changed the title [WIP] Tests on 3.2 Add github workflow for tests on PostGIS 3.2 Sep 2, 2022
/// <param name="geometry">Input geometry.</param>
/// <returns>Geometry type string (with 'ST_' prefix).</returns>
[Sql.Function("ST_GeometryType", ServerSideOnly = true)]
[Sql.Expression("ST_GeometryType({0}::geometry)", ServerSideOnly = true)]
Copy link
Owner

@apdevelop apdevelop Sep 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ST_GeometryType({0}::geometry)"
Could be a better approach than 9fdcaae workaround with version check... will it work in PostGIS 2.5 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works on my machine.

{
const string Wkt1 = "LINESTRING(0 1, 0 2)";
db.TestGeometries.Value(g => g.Id, 1).Value(g => g.Geometry, () => GeometryInput.STGeomFromText(Wkt1)).Insert();
const string wkt1 = "LINESTRING(0 1, 0 2)";
Copy link
Owner

@apdevelop apdevelop Sep 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recommended naming and capitalization convention for constants is to use PascalCasing for constants

@apdevelop apdevelop merged commit 2736323 into apdevelop:develop Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants