$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: barend_at_[hidden]
Date: 2024-11-18 17:31:41
 
> Thanks for the long & detailed review. I got a few minor comments below.
> 
 
Thanks - and also sorry for the layout of the review, I had it earlier locally but it didn't take over all lists etc correctly.
 
>  
> 
> >   With a struct in C++ (this is really cool!)
> >        (it would also be cool if a struct could be inserted!)
> > 
>  
> Do you mean using the member of the structs by name for a parametrized query?
> 
 
Yes! I realize this goes into the direction of a ORM. But you have it for a select query as well.
 
So this would be nice (now, in the future, or maybe it doesn't fit in the library approach):
 
struct query_result
{
int64_tid;
std::string regio_name;
int64_t population;
double latitude;
double longitude;
};
 
auto stat = conn.prepare("insert into italy (regio_name, population, latitude, longitude) values (?1, ?2, ?3, ?4)");
query_result qr{0, "Calabria", 1947131, 38.905, 16.5944};
stat.execute(qr);
 
>  
> This is probably a subtype, which would make a great example for custom conversions. Are you using spatialite?
> 
 
No, I'm using a geopackage. But it's similar, it's sqlite including geometry.
 
https://en.wikipedia.org/wiki/GeoPackage
 
>  
>  
> 
> > 
> > 2:
> > Samples how to use JSON. Do we really need it in this library? Isnât it an extension that can be documented, but not included? That would also avoid a dependency.
> > 
>  
> I have used json data extensively in sqlite and it's usually enabled by default these days, so I think it's a good default to enable it.
> 
 
All right, clear
 
>  
> 
> > 3:
> > Samples how to use BLOB
> > I had to inspect the unit test for it
> > What is open_blob ?
> > 
>  
> You can open a blob field directly without a query and read it's data. That can be especially advantageous if you just want to access part of it.
> 
 
Then it would be nice if it is documented, including a sample!
 
>  
>  
> 
> > 
> > 5: The tag_invoke should be explained better. Why do we need it? How do we define it? A sample would be very welcome. I ignored it further, so maybe I donât need it. Or did I need it for described structures with blobs?
> > 
> > 
> You need it for custom conversions. It's in the url example, but under documented.
> 
 
All right!
 
Cheers, Barend