I have moved my repositories to PostgreSQL and everything is working fine so far. I’m considering using PostgreSQL for everything new from now on since it is nice and simple to work with…
now…
Postgres has a lot of nice features like
Table inheritance
Rules
Functions
Triggers
etc…
While Servoy likes to cache data…
Any firsthand experience out there of which PostgreSQL features work well with Servoy and which ones will confuse Servoy?
Any workarounds?
Let’s say the database alters some records, is there a way to send a message back to Servoy that it needs to refresh? or is it easier to just call a refresh after code which may cause an alteration?
Is there anyone, who can or want to build such a plugin?
I have still some situations where I need Servoy as frontend and php for the website and where it is possible to update records from the web to Servoy clients.
(headless-client is in this specific situation not an option)
One of my clients manages orders from his website on a Servoy-based system and I made him a “update” button which refreshes Servoy and brings in the latest orders… but, if he forgets to refresh – he will not see the new orders
Now, does refresh in Servoy refresh the entire database or just the data in the tables used by the current form?
if you make a plugin then currently the refresh can be for a specific server/table:
public void flushAllClientsCache(String server_name, String table_name);
or all if server/table or null.
You should see new orders automaticly because if you search for them again they will be found (so CTRL-J/Browse All). The refresh are mostly for rows that are changed by another system and servoy already has that row cached.
Also related foundsets could have a problem by getting new rows if they are already completely loaded.. Then also a refresh is needed.
If I refresh a foundset in a Client and it finds new records, it will load them into the Client where I did the refresh, but these new records do not get broadcasted to other Clients…
new records are never broadcasted. (except in related foundsets). Mostly new records are just found when doing a new search for them.
puur java such a plugin is pretty easy. But the database implementation can change for every database. IF it is even possible for a database..
And we still have one problem. Also records that servoy itself changes are seen by that trigger so also those are reported as changed. This behaviour is not very welcome.