That's correct. However, I was thinking it may be possible to enable updates
through an SQL data source by having the user create a DB trigger that would
put changes in a change log table that Persevere could monitor with low-cost
polling (the log table would always be empty except when a change occured,
and then Persevere would empty it again, so the poll's would be very cheap).
I haven't implemented anything along these lines yet, but that is what I was
thinking could be good strategy for sending notifications from a database
that was modified by an alternate agent.
> 2. Second question is, when using Persevere to access an SQL database,
> does Persevere requery the database for each & every client REST
> request, or does it try and cache data? So if my client does: GET /
> Customers to retrieve all customers in the Customers table, I
> assume it's going to requery everytime, right?
Persevere does cache individual objects/rows, partly to maintain object
identity, but currently it doesn't cache queries. The assumption is that it
can be quite complex to update a cached queries as the data changes. I may
try to do some query caching in the future. Of course if a database is
updated from alternate sources (and there is no notification system), then
you must requery every time to get the correct results.
> 3. When defining classes in Persevere to map to a given table's sql
> columns, can I just list some of the columns and it will still work,
> or do I need to make sure every column in the sql table is represented
> in the class definition in the Persevere config files?
You can just do some of the columns, you don't need all of them. Of course
if you create new objects through Persevere, they will be recorded in the
database using INSERT statements that only refer to the columns you have
defined.
Thanks,
Kris
I didn't realize that PostgreSQL had that feature, that's pretty cool. Of
course there can certainly be a PostgreSQL specific data source adapter for
Persevere, it just wouldn't be applicable to other databases.
Kris