On Fri, Oct 15, 2021 at 01:41:59PM -0400, Greg Troxel wrote: > > Sandro Santilli <[email protected]> writes: > > > On Fri, Oct 15, 2021 at 08:12:07AM -0400, Greg Troxel wrote: > > > >> There's a larger question lurking behind that, which is something about > >> if tables in SQL can have NULL values and how that NULL is mapped into > >> qgis's main internal representation and then back out to various > >> formats. (I know there's a great CJ Date rant about NULL not belonging > >> in SQL and how it is a symptom of denormalized data, but it is how it is > >> these days.) > > > > I don't think QGIS needs to support "null" values for feature id. > > Features *need* to have an not-null identifier. > > Sounds perfectly reasonable, but in that case I would expect that it is > a non-optional argument to a constructor, and there should not be a way > to have a default value.
The need inside QGIS is for an "unknown"/"not used"/"don't care" situation, which is what I found in a class. There is probably an "optional" kind of support in C++-11 but I'm not sure it's worth the cost of adding an additional member to a class just to mean the optionality since we can already express it with the existing FID_NULL --strk; _______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
