fasthtml
fasthtml copied to clipboard
[DOCS] MiniDataAPI Spec suggestions
Issue Type
- [x] Existing documentation (e.g. typos, errors, outdated information)
- [ ] Suggest new documentation that is currently missing
Suggested Improvement @pydanny I just read through the new MiniDataAPI Spec docs. It was a great read, thanks for your efforts! I made some notes on a few things that occurred to me. Hope they are useful!\
Edit by @pydanny: Added checkboxes so I can address each of these bullets in turn
- [ ] I noticed that in the doc and in some of Jeremy's videos both
db = Database('test.db')
anddb = database('test.db')
functions are used interchangeably to connect to the db. Are they both exactly the same function, and is either one preferred? In the doc should we use one of them only or clarify both are OK? - [ ] Early on in the doc we learn how to extract a Dataclass version of tables. The method is clear but I wasn't exactly sure why this might be beneficial?
- [ ] When we do a table transform (e.g. to add a new table field) is it also OK to change the
pk
to a different field? If so, do we use table transforms to update the primary key field, even if no other columns are added? - [ ] Related to the above, what other transforms are available? Can we remove fields too for example?
- [ ] In the 2nd paragraph of the .xtra() section I think there is a type. 'v ia' should be 'via'?
- [ ] Also in the .xtra() section, should
2 in todos
be formatted as code, and show an output ofFalse
, just like1 in todos
is? - [ ] Is it OK to set more than one field at a time with
.xtra()
? And can we call.xtra()
again at any time to update the filtering? - [ ] Is it possible to unassign a filter set with
.xtra()
.
Confirmation
Please confirm the following:
- [x] I have checked the existing issues and pull requests to ensure this documentation issue hasn't been reported before.
- [x] I have read the project's documentation and am confident this issue or suggestion is valid.