Content Suggestions

3 posts were split to a new topic: Code formatting

Database has events, can run functions based on create, delete, inserts has access to row data or range of data.

Pub/Sub, Client/Server, or a SignalR type infrastructure (real time UI updates), goes hand in hand with the database events.

Tables, when viewing a table, filters, search table.

Welcome to the Forum!

The above probably belongs as its own, independent Feature Request, under its own, specific title. It deserves separate attention.

This sounds a lot like SQL’s triggers and views.

Filtering is already supported. See “Query Operators” in Searching (querying) a Table. Also see Views.

Triggers and Transactions go hand-in hand.

  • If a trigger receives bad data, then to prevent writing the bad data into the database, it should probably abort the current transaction.
  • If a trigger requires adding detail records, in some other table, then it should probably extend the current transaction to include that update. That way, if the original update/add/delete fails, and the parent record isn’t written, then the (orphaned) detail records won’t get written, either.

I would like to know how to work with dates.

This is best asked in general Q&A (Questions and Answers).

While Anvil uses Python, it does not define Python. That includes Python’s date type. Anvil’s documentation focuses largely on Anvil, leaving documentation of the language and its data types to other, widely-available sources.

For example, there is good information in Python’s own reference material (e.g., Our Documentation | Python.org, datetime — Basic date and time types), and in blogs and tutorials across YouTube and the web (e.g., Ten Python datetime pitfalls, and what libraries are (not) doing about it | Arie Bovenberg).