View Single Post
Old 12-22-2021, 08:19 PM   #1593
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by chaley View Post
db.new_api.backend.create_custom_column()

The method is in db.backend.py, line 998 in current source. Reading the code, it throws an SQL exception if the lookup key is not unique. It throws VALUE_ERROR for some error conditions such as an invalid type or key. It modifies the custom column description table so that the column will appear next time calibre restarts.
I think I have used that at some time. But, I was more thinking of a dialog to prompt for the names to use. But, I might look at the current dialog, with suggestions passed in and disable the type related fields so that that is done correctly. While I like the idea of a simplified prompt that only asks for the name, I also like presenting the full details for people to see, but, making sure the column is created correctly.
davidfor is offline   Reply With Quote