Commit 03b4965766405b4dec625516414cd1d6d7785723

Authored by totoro
1 parent de8fdfcf

add a short_name for table. This is necessary because during checking process th…

…e name of the table is prefixed by the application name.
Hence short_name is the memory of original table name
Showing 1 changed file with 16 additions and 3 deletions   Show diff stats
database/model/db_model.anubis
... ... @@ -205,11 +205,24 @@ public type HK_Display:
205 205 List(String)).
206 206  
207 207 public type HK_Table:
208   - hk_table ( String name, // name of the table
  208 + hk_table ( String name, //name of the table
  209 + String short_name, //table name without app_name in prefix
209 210 HK_Model model,
210 211 HK_Display display).
211 212  
212   - *** (3.8) 'DB_Database' (describing a whole database).
  213 +public define HK_Table
  214 + hk_table
  215 + (
  216 + String name, //name of the table
  217 + HK_Model model,
  218 + HK_Display display
  219 + )=
  220 + hk_table(name, "", model, display).
  221 +
  222 +
  223 +
  224 +
  225 +
213 226  
214 227 Description of a whole database:
215 228  
... ... @@ -977,7 +990,7 @@ public define String
977 990 String indent, //indentation string to use
978 991 HK_List_View list_view //list view to generate
979 992 )=
980   - since table is hk_table(table_name, model, _), //get name and model of the table
  993 + since table is hk_table(table_name, short, model, _), //get name and model of the table
981 994 since model is hk_model( columns, _), //get all columns of table
982 995 // since display is db_display(views, _), //
983 996 with current_list_column = if list_view is
... ...