header.anubis 2.05 KB
/*
 * Created by PyramIDE.
 * User: フランスのトトロ aka (David RENÉ) 
 * Date: 31/12/2015
 * Time: 13:42
 * © David RENÉ
 */

read hayamiki_lib/types/hayamiki.anubis
read tools/basis.anubis
read tools/streams.anubis
read tools/ISO-8601.anubis

define Maybe(One)
  foreign_table_header
  (
    Stream                stream,
    List(HK_Model_Column) columns
  )=
  if columns is
  {
    []      then  success(unique),
    [h . t] then  
      since h is hk_column(_, type, _, _),
        if type is foreign_key(app, table_name, _, _, _) then
        if write_string(stream, "\nread database/generated/"+table_name+".anubis") is
        {
          failure     then failure,
          success(_)  then foreign_table_header(stream, t)
        }
        else
          foreign_table_header(stream, t)
  }
  .
  
  List(MetaSQL_ColStruct)
  
public define Maybe(One)
  generate_header
  (
    Stream                stream,
    List(HK_Model_Column) columns
    
  )=
  if write_string(stream,
"/*
 * Created by 早見木 (Hayamiki).
 * Database generator written by フランスのトトロ aka (David RENÉ)
 * Date: "+_Int_to_ISO_8601_date(now)+"
 * Time: "+_Int_to_ISO_8601_time(now)+"
 * 
 */
transmit tools/basis.anubis

transmit xlib/web/CXM_making_a_web_site.anubis
transmit xlib/web/CXM_common.anubis
transmit xlib/web/CXM_web_dump.anubis
transmit xlib/web/CXM_web_arg_utils.anubis
transmit xlib/web/CXM_json.anubis
transmit xlib/web/widgets/icons_set.anubis
transmit data_base/sqlite.anubis
transmit data_base/db_tools.anubis
transmit xlib/database/db_utils.anubis
transmit xlib/database/db_types.anubis
transmit hayamiki_lib/view/types/hk_form.anubis
transmit hayamiki_lib/view/types/hk_view.anubis
transmit hayamiki_lib/view/types/hk_filter.anubis
transmit hayamiki_lib/types/hayamiki.anubis
transmit hayamiki_lib/controller/hk_sql_utils.anubis
transmit system/logger.anubis
transmit system/datetime.anubis
transmit system/convert.anubis
transmit system/string.anubis
transmit app/app_loggers.anubis
") is failure then failure else
  foreign_table_header(stream, columns)
  .