You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, Npgsql will handle a RANGE type as a string, which is not ideal.
However, I'm not sure the best way to implement this as there's not really a native concept of a range type in .NET. It would probably be hacky to implement this as a two-element array.
Perhaps Npgsql can implement its own Range class which would contain an upper and lower value. This class would also need to support inclusive and exclusive bounds, as well as unbounded ranges.
A bonus feature would be to implement an implicit conversion between Range and String so that code can work with ranges exactly as you could in Postgres, for example:
Range foo = "[5,10]";
As well as operators to compare ranges with other instances.
Activity
roji commentedon Jan 2, 2015
Implemented by @Emill (binary-only) but needs tests
roji commentedon Jan 4, 2015
Just noticed that there's already a test. Should probably also test array support but all in all this seems good.