/* * Created by PyramIDE. * User: フランスのトトロ aka (David RENÉ) * Date: 14/05/2025 * Time: 16:56 * © David RENÉ Hayamiki is Copyright © 2016-2025 by David RENÉ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ read app/app_types.anubis read hayamiki_lib/types/hayamiki.anubis read SQLite/create_table.anubis read PostgreSQL/create_table.anubis public define Maybe(One) generate_create_table ( String app_name, List(HK_App) apps, //list of the table model description String dest_dir, //destination directory HK_DB_engine hk_db_engine, //for which database engine we generate String version, String _sha1 )= if hk_db_engine is { sqlite3 then generate_sqlite_create_table(app_name, apps, dest_dir, version, _sha1), postgresql then generate_postgresql_create_table(app_name, apps, dest_dir, version, _sha1), } .