Conversation
|
@Jimmacle just to set expectations, since this depends on npgsql/npgsql#3867, it would be better to wait for that to be merged before spending too much time on this. In addition, in the next 2 months (more or less) I'll mostly likely be very busy with Npgsql/EF/.NET stabilization work, so there's little chance I'll be able to give this much attention... |
|
@Jimmacle FYI npgsql/npgsql#3867 has just been merged on the Npgsql side; this opens the way for adding the support here on the EFCore.PG side. .NET and EF 10 are about to be released - in less than two weeks - and ideally EFCore.PG would be released very soon. Do you think you'll have the time to rebase this PR and do the remaining work to push this through (it would be really nice to release cube support at both levels)? Note that to get the lower-level Npgsql support you only need to take a reference on Npgsql 10.0.0-rc.2-ci.20251103T150833 or later. Let me know. |
|
Superceded by #3651. |
This PR implements #1938. It depends on the changes in npgsql/npgsql#3867.
This is currently pretty rough and incomplete but I'm putting it up as a draft for visibility. It's my first dive into working with EF Core database provider implementations so feel free to point out anything I'm doing wrong.
Current API as of e130ecd:
cube && cubebool Overlaps(this NpgsqlCube a, NpgsqlCube b)cube @> cubebool Contains(this NpgsqlCube a, NpgsqlCube b)cube <@ cubebool ContainedBy(this NpgsqlCube a, NpgsqlCube b)cube -> integerdouble NthCoordinate(this NpgsqlCube cube, int n)cube ~> integerdouble NthCoordinate2(this NpgsqlCube cube, int n)cube <-> cubedouble Distance(this NpgsqlCube a, NpgsqlCube b)cube <#> cubedouble DistanceTaxicab(this NpgsqlCube a, NpgsqlCube b)cube <=> cubedouble DistanceChebyshev(this NpgsqlCube a, NpgsqlCube b)cube_union(cube, cube)NpgsqlCube Union(this NpgsqlCube a, NpgsqlCube b)cube_inter(cube, cube)NpgsqlCube Intersect(this NpgsqlCube a, NpgsqlCube b)cube_enlarge(c cube, r double, n integer)NpgsqlCube Enlarge(this NpgsqlCube cube, double r, int n)cube_dim(cube)int Dimensionscube_ll_coord(cube, integer)double LlCoord(int n)cube_ur_coord(cube, integer)double UrCoord(int n)cube_is_point(cube)bool Pointcube_subset(cube, integer[])NpgsqlCube Subset(params int[] indexes)Looking for feedback on these points:
NthCoordinate2that differentiates it fromNthCoordinate. Maybe shortenCoordinatetoCoordto be consistent withLlCoordandUrCoord?NpgsqlCube.LowerLeftandNpgsqlCube.UpperRightor only supporting theLlCoordandUrCoordmethods.