5630 lines
394 KiB
HTML
5630 lines
394 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
<html>
|
||
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
|
||
<title>QxOrm : C++ Qt ORM Object Relational Mapping database library - QxEntityEditor : C++ Qt entities graphic
|
||
editor (data model designer and source code generator)</title>
|
||
<link rel='stylesheet' type='text/css' href='./resource/qxorm_style.css'>
|
||
<script type="text/javascript" src="./resource/jquery.min.js"></script>
|
||
<script type="text/javascript" src="./resource/qxorm_script.js"></script>
|
||
</head>
|
||
|
||
<body>
|
||
<table border="0" style="width: 80%" align="center">
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<tbody>
|
||
<tr>
|
||
<td><a href="./home.html"><img alt="QxOrm" src="./resource/logo_qxorm_and_qxee.png" align="left"
|
||
border="0"></a></td>
|
||
<td align="right" style="vertical-align:bottom">
|
||
<div id="qx_search">
|
||
<gcse:search></gcse:search>
|
||
</div>
|
||
</td>
|
||
<td width="15"></td>
|
||
<td align="right" style="vertical-align:bottom">
|
||
<img alt="Windows" src="./resource/logo_windows.gif" width="35" height="35">
|
||
<img alt="Linux" src="./resource/logo_linux.gif" width="35" height="35">
|
||
<img alt="Macintosh" src="./resource/logo_mac.gif" width="35" height="35">
|
||
</td>
|
||
<td width="70"><img alt="C++" src="./resource/logo_cpp.gif" width="50" height="50" align="right"></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<hr style="width: 80%" align="center" size="1" color="#100D5A">
|
||
<table border="0" style="width: 80%" align="center">
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<tbody>
|
||
<tr>
|
||
<td align="center"><a href="./home.html" class="btn_nav">Home</a></td>
|
||
<td align="center"><a href="./download.html" class="btn_nav">Download</a></td>
|
||
<td align="center"><a href="./quick_sample.html" class="btn_nav">Quick sample</a></td>
|
||
<td align="center" onmouseover="showHideElementById('menu_tuto', true);"
|
||
onmouseout="showHideElementById('menu_tuto', false);">
|
||
<a href="./tutorial.html" class="btn_nav">Tutorial (4)</a>
|
||
<table class="table_menu_tuto">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<div id="menu_tuto" class="div_menu_tuto">
|
||
<a href="./tutorial_3.html" class="btn_sub_menu">install QxOrm</a><br />
|
||
<a href="./tutorial.html" class="btn_sub_menu">qxBlog</a><br />
|
||
<a href="./tutorial_2.html" class="btn_sub_menu">qxClientServer</a><br />
|
||
<a href="./tutorial_4.html" class="btn_sub_menu">QxEntityEditor videos</a>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</td>
|
||
<td align="center" onmouseover="showHideElementById('menu_manual', true);"
|
||
onmouseout="showHideElementById('menu_manual', false);">
|
||
<a href="./manual.html" class="btn_nav">Manual (2)</a>
|
||
<table class="table_menu_manual">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<div id="menu_manual" class="div_menu_manual">
|
||
<a href="./manual.html" class="btn_sub_menu">QxOrm manual</a><br />
|
||
<a href="./manual_qxee.html" class="btn_sub_menu">QxEntityEditor manual</a><br />
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</td>
|
||
<td align="center"><a href="./link.html" class="btn_nav">Forum</a></td>
|
||
<td align="center"><a href="./customer.html" class="btn_nav">Our customers</a></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<hr style="width: 80%" align="center" size="1" color="#100D5A">
|
||
<table border="0" style="width: 80%" align="center">
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<tbody>
|
||
<tr>
|
||
<td align="left" valign="top">
|
||
<font size="2" class="txt_with_shadow">QxOrm >> Manual - QxEntityEditor application user guide
|
||
</font>
|
||
</td>
|
||
<td align="right" valign="top">
|
||
<table cellspacing="0" cellpadding="1">
|
||
<col>
|
||
<col>
|
||
<tbody>
|
||
<tr>
|
||
<td align="right" valign="top">
|
||
<font size="2" class="txt_with_shadow">Current version : </font>
|
||
</td>
|
||
<td align="left" valign="top">
|
||
<font size="2" class="txt_with_shadow">QxOrm 1.5.0 - <a href="../doxygen/index.html"
|
||
target="_blank">QxOrm library online class documentation</a> - <a
|
||
href="https://github.com/QxOrm/QxOrm" target="_blank">GitHub</a></font>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="right" valign="top">
|
||
<font size="2" class="txt_with_shadow"></font>
|
||
</td>
|
||
<td align="left" valign="top">
|
||
<font size="2" class="txt_with_shadow">QxEntityEditor 1.2.8</font>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</td>
|
||
<td width="10px"></td>
|
||
<td width="40px" height="30px"><a href="../qxorm_fr/manual_qxee.html"><img alt="Version fran<61>aise du site"
|
||
src="./resource/FR.png" width="40" height="30" border="0"></a></td>
|
||
<td width="40px" height="30px"><a href="../qxorm_en/manual_qxee.html"><img alt="Web site english version"
|
||
src="./resource/GB.png" width="40" height="30" border="0"></a></td>
|
||
<td width="40px" height="30px"><a href="http://sites.google.com/site/qxormpostgres/" target="_blank"><img
|
||
alt="" src="./resource/ES.png" width="40" height="30" border="0"></a></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<table border="1" frame="vsides" rules="cols" style="width: 80%" align="center" cellpadding="6" bgcolor="#F2F2F4">
|
||
<col>
|
||
<tbody>
|
||
<tr>
|
||
<td align="justify">
|
||
<script>$(function () { initQxOrmManualWebPage(); });</script>
|
||
<table border="0" cellpadding="4">
|
||
<col>
|
||
<col>
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<font class="txt_with_shadow" color="#0B0B61" size="4"><i>Select a manual : </i></font>
|
||
</td>
|
||
<td align="left">
|
||
<a href="./manual.html" class="btn_tuto">QxOrm user guide</a>
|
||
<a href="./manual_qxee.html" class="btn_tuto_selected">QxEntityEditor user guide</a>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<hr style="width: 100%" align="center" size="1" color="#100D5A">
|
||
<br>
|
||
<table border="0" style="width: 100%" align="center">
|
||
<col>
|
||
<col>
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<h3 class="txt_slogan"><b>QxEntityEditor application manual - Table of Contents</b></h3>
|
||
<div id="manual_table_of_contents">
|
||
<ol class="manual_manual_ol_title_1" type="I">
|
||
<li class="manual_li_title_1">
|
||
<a href="#intro">Introduction</a>
|
||
<ol class="manual_ol_title_2" type="1">
|
||
<li class="manual_li_title_2">
|
||
<a href="#intro_01">QxEntityEditor : graphic editor for QxOrm library</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#download_and_install">Download and installation</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#intro_videos">QxEntityEditor videos</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_1">
|
||
<a href="#qxee_manual">Main features</a>
|
||
<ol class="manual_ol_title_2" type="1">
|
||
<li class="manual_li_title_2">
|
||
<a href="#qxee_views">Main screen views</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#qxee_zoom">Zoom on entities diagram</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#qxee_splitter">"Splitter" view mode</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#global_settings">QxEntityEditor application settings</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#license_details">Register a license key</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#project_params_wnd">Create/open a *.qxee project</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#qxee_database">Architecture of a *.qxee project file (SQLite
|
||
database)</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#project_settings">Project settings</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#entities">Manage entities</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#entities_create">Create a new entity</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#entities_modify">Modify an entity</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#entities_delete">Delete an entity</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#entities_clone">Clone an entity</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#entity_params">Entity settings</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#color_settings_by_item">Colors associated to an entity</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#properties">Manage list of properties of an entity</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#properties_actions">Add/modify/delete a property</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#property_params">Property settings</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#relationships">Manage relationships between entities</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#relationships_actions">Add/modify/delete a relationship</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#relationship_params">Relationship settings</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#enums">Manage enumerations</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#enums_actions">Add/modify/delete/clone an enumeration</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#enumeration_params">Enumeration settings</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#enums_colors">Colors associated to an enumeration</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#namespace">Manage namespaces</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#rename_namespace">Rename a namespace</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#color_settings_by_namespace">Manage colors of a namespace</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#comment_params">Manage post-it/comments</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#comments_actions">Add/modify/delete/clone a post-it</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#comments_colors">Colors associated to a post-it</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#organize_diagram_layout">Organize diagram layout</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#tag_project_state">Project historic (tag project state)</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#cpp_preview_code">C++ source code preview</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#naming_convention">Naming convention (snake_case, camelCase)</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#plugin_about">List of available plugins</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_1">
|
||
<a href="#import_plugins">Import plugins</a>
|
||
<ol class="manual_ol_title_2" type="1">
|
||
<li class="manual_li_title_2">
|
||
<a href="#wnd_source_control_import">Import from a directory linked to a
|
||
Source Control manager (Git, Perforce, CVS, etc.)</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#wnd_json_import">Import project based on JSON file</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#wnd_mysql_import">Import from MySQL or MariaDB database</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#wnd_postgresql_import">Import from PostgreSQL database</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#wnd_sqlite_import">Import from SQLite database</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#wnd_odbc_import">Import from database using ODBC driver (Oracle, MS
|
||
SQL Server, etc.)</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_1">
|
||
<a href="#export_plugins">Export plugins</a>
|
||
<ol class="manual_ol_title_2" type="1">
|
||
<li class="manual_li_title_2">
|
||
<a href="#cpp_export_settings">Export to C++ project</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#cpp_export_settings_parameters">C++ export settings</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#cpp_export_settings_generated">Overview of generated C++
|
||
project</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#cpp_export_settings_compilation">Build generated C++ project
|
||
(using qmake or cmake)</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#cpp_export_settings_example">Example : how to use generated
|
||
C++ project</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#cpp_model_view_export_settings">Export to C++ model/view project</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#cpp_model_view_export_settings_parameters">Export settings</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#cpp_model_view_export_settings_generated">Overview of
|
||
generated project</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#cpp_services_export_settings">Export to C++ services project</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#cpp_services_export_settings_parameters">Export settings</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#cpp_services_export_settings_generated">Overview of generated
|
||
project</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#cpp_services_export_settings_server_app">Generic application
|
||
server to provide services</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#ddl_export_settings">Export SQL DDL database schema</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#printer_settings">Print entities diagram</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#source_control_export_settings">Export to a directory linked to a
|
||
Source Control manager (Git, Perforce, CVS, etc.)</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#xml_export_settings">Export project to XML or JSON format</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_1">
|
||
<a href="#js_engine">Javascript engine to customize export</a>
|
||
<ol class="manual_ol_title_2" type="1">
|
||
<li class="manual_li_title_2">
|
||
<a href="#js_engine_architecture">Architecture and workflow of Javascript
|
||
engine</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#js_engine_input_params">Input parameters of Javascript
|
||
engine</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#js_engine_functions">Available functions in Javascript</a>
|
||
<ol class="manual_ol_title_3" type="a">
|
||
<li class="manual_li_title_3">
|
||
<a href="#js_engine_functions_entity">Get entity details</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#js_engine_functions_iterate_property">Iterate over list of
|
||
properties of an entity</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#js_engine_functions_property">Get property details</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#js_engine_functions_enum">Get enumeration details</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#js_engine_functions_meta_data">Get meta-data of
|
||
entity/property/enumeration</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#js_engine_functions_env_var">Get environment variable</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#js_engine_functions_files">Read and write to files</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#js_engine_functions_list">Get list of entities/enumerations of
|
||
a project</a>
|
||
</li>
|
||
<li class="manual_li_title_3">
|
||
<a href="#js_engine_qxee_params">Fetch all application settings (at
|
||
global level, project level and plugin level)</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#js_engine_placeholder">Add a custom action (placeholder) in C++
|
||
export template</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#js_engine_example_q_property">Script example : add automatically
|
||
Q_PROPERTY definition on all generated C++ properties</a>
|
||
</li>
|
||
<li class="manual_li_title_2">
|
||
<a href="#js_engine_debug">Enable Javascript debugger editor</a>
|
||
</li>
|
||
</ol>
|
||
</li>
|
||
<li class="manual_li_title_1">
|
||
<a href="#plugin_script">Execute custom scripts (shell/bat) before/after plugin
|
||
execution</a>
|
||
</li>
|
||
<li class="manual_li_title_1">
|
||
<a href="#qxee_command_line">QxEntityEditor command-line interface</a>
|
||
</li>
|
||
</ol>
|
||
</td>
|
||
<td width="200" align="center" valign="top"><a href="./resource/qt_ambassador_logo.png"
|
||
target="_blank"><img alt="qt_ambassador" src="./resource/qt_ambassador_logo_150x150.png"
|
||
width="150" height="150" border="0"></a><br>
|
||
<b>
|
||
<font size="2">QxOrm library has been accepted into the <a
|
||
href="http://forum.qt.io/category/24/qt-ambassador-program" target="_blank">Qt
|
||
Ambassador Program</a></font>
|
||
</b>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<br>
|
||
<hr width="90%">
|
||
<div id="manual_content">
|
||
|
||
<p class="manual_p_title_1"><a class="manual_a_title_1" name="intro">Introduction</a></p>
|
||
<div class="manual_div_content_1">
|
||
The goal of this documentation is to provide a user guide to learn how to work with
|
||
<b>QxEntityEditor</b> application features (the graphic editor for QxOrm library).
|
||
This manual is intended for developers and software architects who are looking for a solution to
|
||
manage a persistent data layer in C++/Qt.
|
||
Technical skills in C++ and databases are required to understand this document.
|
||
<br><br>
|
||
<b>Note :</b> <a href="./manual.html">another documentation dedicated to <b>QxOrm</b> library is
|
||
available</a>.
|
||
<br><br>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="intro_01">QxEntityEditor : graphic
|
||
editor for QxOrm library</a></p>
|
||
<div class="manual_div_content">
|
||
<b>QxEntityEditor</b> is a graphic editor for <b>QxOrm</b> library : <b>QxEntityEditor</b>
|
||
provides a graphic way to manage the data model.<br>
|
||
<b>QxEntityEditor</b> is multi-platform (available for Windows, Linux and Mac OS X) and
|
||
generates native code for all environments : desktop (Windows, Linux, Mac OS X), embedded and
|
||
mobile (Android, iOS, Windows Phone, Raspberry Pi, etc.).<br>
|
||
<br>
|
||
<b>QxEntityEditor</b> is based on plugins and provides many ways to import/export your data
|
||
model :
|
||
<ul>
|
||
<li><a href="#cpp_export_settings">generate C++ persistent classes</a> automatically
|
||
(registered in QxOrm context) ;</li>
|
||
<li><a href="#ddl_export_settings">generate DDL SQL script</a> automatically (database
|
||
schema) for SQLite, MySQL, PostgreSQL, Oracle and MS SQL Server ;</li>
|
||
<li>manage schema evolution for each project version (<i>ALTER TABLE</i>, <i>ADD COLUMN</i>,
|
||
<i>DROP INDEX</i>, etc.) ;
|
||
</li>
|
||
<li>transfer your data model over network and <a href="#cpp_services_export_settings">create
|
||
quickly client/server applications</a>, using <a
|
||
href="../doxygen/html/group___qx_service.html" target="_blank">QxService</a> module ;
|
||
</li>
|
||
<li><a href="#wnd_mysql_import">import existing database structure</a> (using ODBC connection
|
||
or native drivers) for SQLite, MySQL, PostgreSQL, Oracle and MS SQL Server databases ;
|
||
</li>
|
||
<li>because each project is different, QxEntityEditor provides several ways to customize
|
||
generated files (especially <a href="#js_engine">a javascript engine and an integrated
|
||
debugger</a>).</li>
|
||
</ul>
|
||
<table border="0" style="width:90%" align="center">
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<tbody>
|
||
<tr>
|
||
<td valign="bottom" style="text-align:center;"><a
|
||
href="https://www.qxorm.com/qxentityeditor/resource/qxee_windows.png"
|
||
target="_blank"><img alt="QxEntityEditor on Windows"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_windows_small.png" /></a>
|
||
</td>
|
||
<td valign="bottom" style="text-align:center;"><a
|
||
href="https://www.qxorm.com/qxentityeditor/resource/qxee_linux.png"
|
||
target="_blank"><img alt="QxEntityEditor on Linux"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_linux_small.png" /></a>
|
||
</td>
|
||
<td valign="bottom" style="text-align:center;"><a
|
||
href="https://www.qxorm.com/qxentityeditor/resource/qxee_macosx.png"
|
||
target="_blank"><img alt="QxEntityEditor on Mac OS X"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_macosx_small.png" /></a>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;"><i>QxEntityEditor on Windows</i></td>
|
||
<td style="text-align:center;"><i>QxEntityEditor on Linux</i></td>
|
||
<td style="text-align:center;"><i>QxEntityEditor on Mac OS X</i></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<br><br>
|
||
<b>QxEntityEditor</b> application is developed by XDL Team, a software development engineer
|
||
since 2003.<br>
|
||
<br><br>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="download_and_install">Download and
|
||
installation</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor application can be downloaded <a href="./download.html">on QxOrm web site, <20>
|
||
Download <20> web page</a>.
|
||
Several QxEntityEditor versions are available :
|
||
<ul>
|
||
<li><b>Windows</b> (from Windows XP to Windows 10) 32bits and 64bits mode ;</li>
|
||
<li><b>Linux</b> (Ubuntu, Fedora, etc...) 32bits and 64bits mode ;</li>
|
||
<li><b>Mac OS X</b> (64bits only).</li>
|
||
</ul>
|
||
For Windows, QxEntityEditor is available with an installation setup or a portable ZIP file.<br>
|
||
For Linux and Mac OS X, QxEntityEditor is available only with a portable ZIP file.<br>
|
||
No extra dependency is required, QxEntityEditor installation is very easy : you just have to
|
||
unzip downloaded file and run QxEntityEditor executable.
|
||
<br><br>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="intro_videos">QxEntityEditor
|
||
videos</a></p>
|
||
<div class="manual_div_content">
|
||
Here is <a href="http://www.youtube.com/watch?v=ZyjvDiOI3uw" target="_blank">a quick overview of
|
||
QxEntityEditor features</a> :<br />
|
||
<br />
|
||
<iframe width="640" height="360" src="//www.youtube.com/embed/ZyjvDiOI3uw?rel=0" frameborder="0"
|
||
allowfullscreen></iframe><br />
|
||
<br />
|
||
Video presentation step by step :
|
||
<ul>
|
||
<li>Download and install QxOrm library <i>(10s)</i> ;</li>
|
||
<li>Download and install QxEntityEditor <i>(56s)</i> ;</li>
|
||
<li>Create a QxEntityEditor project <i>(1m 46s)</i> ;</li>
|
||
<li>Export entities to a C++/Qt project <i>(8m 26s)</i> ;</li>
|
||
<li>Export entities to a DDL SQL database script <i>(10m 22s)</i> ;</li>
|
||
<li>Create a client/server application to transfer entities over network <i>(12m 31s)</i> ;
|
||
</li>
|
||
<li>Export QxEntityEditor project to a XML or JSON file <i>(17m 13s)</i> ;</li>
|
||
<li>Execute QxEntityEditor with command line (no GUI) <i>(18m 07s)</i>.</li>
|
||
</ul>
|
||
<br />
|
||
<hr style="width: 90%" align="center" size="1" color="#100D5A">
|
||
<br />
|
||
Here is <a href="http://www.youtube.com/watch?v=M-DcTqh4OZQ" target="_blank">another video of
|
||
QxEntityEditor application</a> to show how to import an existing database structure (MySQL
|
||
Workbench project) :<br />
|
||
<br />
|
||
<iframe width="640" height="360" src="//www.youtube.com/embed/M-DcTqh4OZQ" frameborder="0"
|
||
allowfullscreen></iframe><br />
|
||
<br />
|
||
Video step by step :
|
||
<ul>
|
||
<li>MySQL Workbench project - Sakila sample database <i>(10s)</i> ;</li>
|
||
<li>Create a DSN to connect to MySQL by ODBC <i>(46s)</i> ;</li>
|
||
<li>Import database structure in a QxEntityEditor project <i>(1m 15s)</i> ;</li>
|
||
<li>Export QxEntityEditor project to a C++ Qt project <i>(3m 10s)</i> ;</li>
|
||
<li>Build the generated C++ Qt project <i>(4m 22s)</i>.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
</div>
|
||
|
||
<p class="manual_p_title_1"><a class="manual_a_title_1" name="qxee_manual">Main features</a></p>
|
||
<div class="manual_div_content_1">
|
||
<b>QxEntityEditor</b> is a graphic editor to manage : entities, properties, relationships between
|
||
entities, enumerations, namespaces.
|
||
To link database and C++ source code :
|
||
<ul>
|
||
<li>an entity is a table on database side, and a class on C++ source code side ;</li>
|
||
<li>a property is a column of a table on database side, and a data member of a class on C++
|
||
source code side ;</li>
|
||
<li>a relationship (<i>1-n</i>, <i>n-1</i>, <i>1-1</i> or <i>n-n</i>) is a link between 2 tables
|
||
(foreign key) on database side, and a link between 2 classes on C++ source code side ;</li>
|
||
<li>an enumeration is a list of values available on C++ source code side (for now, this is just
|
||
a converted numeric value on database side) ;</li>
|
||
<li>a namespace is a database schema, and where classes are located on C++ source code side.
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="qxee_views">Main screen views</a></p>
|
||
<div class="manual_div_content">
|
||
Here is a screenshot which shows all areas of QxEntityEditor main view :
|
||
<br /><br />
|
||
<img alt="All views" src="https://www.qxorm.com/qxentityeditor/resource/qxee_all_views.jpg" />
|
||
<br /><br />
|
||
<ul>
|
||
<li><i>Area 1 :</i> main menu and toolbar of QxEntityEditor application ==> all actions are
|
||
available with these buttons ;</li>
|
||
<li><i>Area 2 :</i> listbox to load quickly recent projects ;</li>
|
||
<li><i>Area 3 :</i> treeview to display all project items (entities, properties,
|
||
relationships, enumerations, namespaces) ;</li>
|
||
<li><i>Area 4 :</i> "<i>Navigator</i>" view to move quickly on entities diagram (useful for
|
||
large projects) ;</li>
|
||
<li><i>Area 5 :</i> entities diagram to display all project items on a graphical view ;</li>
|
||
<li><i>Area 6 :</i> settings screen (with tabs) for entities, properties, relationships,
|
||
enumerations + C++ source code preview ;</li>
|
||
<li><i>Area 7 :</i> zoom on entities diagram.</li>
|
||
</ul>
|
||
<br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="qxee_zoom">Zoom on entities
|
||
diagram</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor application provides several ways to zoom on entities diagram :
|
||
<ul>
|
||
<li>using the main menu : <i>View >> Zoom view to XX%</i> ;</li>
|
||
<li>using the slider at the bottom-right of the screen ;</li>
|
||
<li>using a contextual menu, right-click on entities diagram, sub-menu : <i>View >>
|
||
Zoom view to XX%</i> ;</li>
|
||
<li>using left-click + mouse wheel on entities diagram.</li>
|
||
</ul>
|
||
<br />
|
||
<img alt="Zoom" src="https://www.qxorm.com/qxentityeditor/resource/qxee_zoom.png" />
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="qxee_splitter">"Splitter" view
|
||
mode</a></p>
|
||
<div class="manual_div_content">
|
||
<i>View >> Show/hide splitter mode</i> menu switches tabs settings (entities,
|
||
properties, relationships, enumerations + C++ source code preview) :
|
||
<ul>
|
||
<li>on the right part of the screen to provide a quick access on selected item settings ;
|
||
</li>
|
||
<li>hidden to display entities diagram on full screen (default value).</li>
|
||
</ul>
|
||
<br />
|
||
<img alt="Splitter mode"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_splitter.png" />
|
||
<br /><br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="global_settings">QxEntityEditor
|
||
application settings</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor application global parameters (for all projects) are accessible via main menu
|
||
<i>Tools >> Global settings</i> :
|
||
<br /><br />
|
||
<img alt="Global settings"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_global_settings.png" />
|
||
<br />
|
||
<ul>
|
||
<li>Field <20> <i>QxOrm library path</i> <20> : define where QxOrm library is located.
|
||
This parameter is required to run a C++ export process to find <i>QxOrm.pri</i> (or
|
||
<i>QxOrm.cmake</i>) configuration file.
|
||
You can put an absolute path, or use an environment variable, for example :
|
||
<i>$$(QXORM_DIR)</i> ;
|
||
</li>
|
||
<li>Field <20> <i>Auto load last opened project at startup</i> <20> : run QxEntityEditor
|
||
application loading automatically the last opened project ;</li>
|
||
<li>Field <20> <i>Display property type in entities viewer</i> <20> : if option enabled, then each
|
||
property type is displayed on entities diagram ;</li>
|
||
<li>Field <20> <i>Use old style to draw relationships</i> <20> : simplify relationships display
|
||
(<i>1-n</i>, <i>n-1</i>, <i>1-1</i> or <i>n-n</i>) on entities diagram ;</li>
|
||
<li>Field <20> <i>Disable undo/redo feature</i> <20> : can be useful to optimize performance with
|
||
large projects ;</li>
|
||
<li>Fields <20> <i>Entity/Enum/Comment width</i> <20> : define default items width on entities
|
||
diagram.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="license_details">Register a license
|
||
key</a></p>
|
||
<div class="manual_div_content">
|
||
Without a valid license key, a QxEntityEditor project is limited to 5 entities per project.
|
||
To remove this limitation, you can register a license key via main menu <i>Help >> License
|
||
information</i> :
|
||
<br /><br />
|
||
<img alt="License" src="https://www.qxorm.com/qxentityeditor/resource/qxee_license.png" />
|
||
<br /><br />
|
||
Just copy/past your license key in the field <i>License key</i>, then push the <i>Save</i>
|
||
button.
|
||
A web access is required to register a license key.
|
||
If no error occurred, then the license key is registered and QxEntityEditor application can be
|
||
used without any limitation until <i>Expiration date</i> field.
|
||
<br /><br />
|
||
<b>Note :</b> if a web access error occurred during registration, you could try to enable <20>
|
||
<i>If you are behind a proxy...</i> <20> option.
|
||
<br /><br />
|
||
<b>Other note :</b> to get a valid license key, please contact us at : <a
|
||
href="mailto:ic-east.com">ic-east.com</a>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="project_params_wnd">Create/open a
|
||
*.qxee project</a></p>
|
||
<div class="manual_div_content">
|
||
A new QxEntityEditor project is created via main menu <i>File >> New project</i> :
|
||
<br /><br />
|
||
<img alt="Project new"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_project_new.png" />
|
||
<br />
|
||
<ul>
|
||
<li>Field <20> <i>Project name</i> <20> : the QxEntityEditor project name. Project file has the
|
||
same name with <i>*.qxee</i> extension ;</li>
|
||
<li>Field <20> <i>Project location</i> <20> : define where QxEntityEditor project is located. You
|
||
can use the "<i>...</i>" button to select a directory.</li>
|
||
</ul>
|
||
<br />
|
||
An existing QxEntityEditor project can be opened via main menu <i>File >> Open project</i>
|
||
: then just select a project file with <i>*.qxee</i> extension.
|
||
Under the main toolbar of QxEntityEditor application, a list of recent projects is available to
|
||
switch quickly from a project to another :
|
||
<br /><br />
|
||
<img alt="Project list"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_project_list.png" />
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="qxee_database">Architecture of a
|
||
*.qxee project file (SQLite database)</a></p>
|
||
<div class="manual_div_content">
|
||
A <i>*.qxee</i> project file of QxEntityEditor application is a SQLite database.<br />
|
||
A same QxEntityEditor project can be shared on all environments : Windows, Linux and Mac OS
|
||
X.<br />
|
||
A <i>*.qxee</i> project file can be opened by a SQLite database manager tool : for example,
|
||
the free Firefox plugin <a href="https://addons.mozilla.org/fr/firefox/addon/sqlite-manager/"
|
||
target="_blank">SQLite Manager</a> :
|
||
<br /><br />
|
||
<img alt="Project database"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_database.png" />
|
||
<br /><br />
|
||
<b>Note :</b> using the <a href="#plugin_script">Execute custom scripts (shell/bat)
|
||
before/after plugin execution</a> feature, it is possible for example to apply a script
|
||
(<i>.bat</i> or <i>.sh</i>) to modify some imported data in the <i>*.qxee</i> SQLite database
|
||
file <a href="#import_plugins">after an import process</a>.
|
||
<br /><br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="project_settings">Project
|
||
settings</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor <i>*.qxee</i> project parameters are accessible via main menu <i>Tools >>
|
||
Project settings</i> :
|
||
<br /><br />
|
||
<img alt="Project settings tab 1"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_project_settings_01.png" />
|
||
<br /><br />
|
||
<ul>
|
||
<li>Field <20> <i>Default entity namespace</i> <20> : default namespace when an entity is created
|
||
(it is possible to define another namespace in <a href="#entity_params">Entity
|
||
settings</a> screen) ;</li>
|
||
<li>Field <20> <i>Table name prefix</i> <20> : prefix used to set table name associated to entity ;
|
||
</li>
|
||
<li>Field <20> <i>Table name suffix</i> <20> : suffix used to set table name associated to entity ;
|
||
</li>
|
||
<li>Field <20> <i>Primary key prefix</i> <20> : prefix used to set primary key name associated to
|
||
entity ;</li>
|
||
<li>Field <20> <i>Primary key suffix</i> <20> : suffix used to set primary key name associated to
|
||
entity ;</li>
|
||
<li>Field <20> <i>Default primary key type</i> <20> : default C++ type for primary keys ;</li>
|
||
<li>Field <20> <i>Default property type</i> <20> : default C++ type for properties.</li>
|
||
</ul>
|
||
<br />
|
||
The second tab of project parameters screen provides a way to manage items colors in the
|
||
entities diagram at a project level :
|
||
<br /><br />
|
||
<img alt="Project settings tab 2"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_project_settings_02.png" />
|
||
<br /><br />
|
||
<b>Note :</b> items colors in the entities diagram can be defined at several levels (from the
|
||
more global level to the more specific level) :
|
||
<ul>
|
||
<li><a href="#project_settings">at projet level</a> : via main menu <i>Tools >> Project
|
||
settings</i>, <i>Colors</i> tab ;</li>
|
||
<li><a href="#color_settings_by_namespace">at namespace level</a> : via right-click
|
||
contextual menu on a namespace <i>Define colors by namespace</i> ;</li>
|
||
<li><a href="#color_settings_by_item">at item level (entity, enumeration or post-it)</a> :
|
||
via right-click contextual menu on an item <i>Define entity colors</i>.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="entities">Manage entities</a></p>
|
||
<div class="manual_div_content">
|
||
An entity in QxEntityEditor application is a table from a database point of view, and is a
|
||
persistent class (registered in QxOrm context) in C++ source code.
|
||
QxEntityEditor application provides features to create, modify, delete and clone entity.
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="entities_create">Create a new
|
||
entity</a></p>
|
||
<div class="manual_div_content">
|
||
A new entity can be created via :
|
||
<ul>
|
||
<li>Main menu : <i>Actions >> New entity</i> ;</li>
|
||
<li>Right-click contextual menu on entities diagram : <i>Entity >> New entity</i> ;
|
||
</li>
|
||
<li>The <20> <i>Create a new entity</i> <20> button on entity parameters screen when no entity
|
||
is selected.</li>
|
||
</ul>
|
||
<br />
|
||
<img alt="Entity new"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_entity_new.png" />
|
||
<br /><br />
|
||
<b>Note :</b> these actions open the <a href="#entity_params">entity parameters screen</a> in
|
||
creation context.
|
||
The entity will be really created and added to the <i>*.qxee</i> project after saving it in
|
||
the <a href="#entity_params">entity parameters screen</a>.
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="entities_modify">Modify an
|
||
entity</a></p>
|
||
<div class="manual_div_content">
|
||
An entity can be modified via :
|
||
<ul>
|
||
<li>Main menu : <i>Actions >> Modify entity</i> ;</li>
|
||
<li>Right-click contextual menu on entities diagram : <i>Entity >> Modify entity</i>
|
||
;</li>
|
||
<li>A double-click on entity name in the entities diagram.</li>
|
||
</ul>
|
||
<br />
|
||
<img alt="Entity modify"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_entity_modify.png" />
|
||
<br /><br />
|
||
<b>Note :</b> these actions open the <a href="#entity_params">entity parameters screen</a> in
|
||
change context.
|
||
All entity changes will be really applied to the <i>*.qxee</i> project after saving it in the
|
||
<a href="#entity_params">entity parameters screen</a>.
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="entities_delete">Delete an
|
||
entity</a></p>
|
||
<div class="manual_div_content">
|
||
An entity (or several entities) can be deleted via :
|
||
<ul>
|
||
<li>Main menu : <i>Actions >> Delete entity</i> ;</li>
|
||
<li>Right-click contextual menu on entities diagram : <i>Entity >> Delete entity</i>
|
||
;</li>
|
||
<li>The "<i>Del</i>" keyboard shortcut when 1 or several entities are selected.</li>
|
||
</ul>
|
||
<br />
|
||
<img alt="Entity delete"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_entity_delete.png" />
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="entities_clone">Clone an
|
||
entity</a></p>
|
||
<div class="manual_div_content">
|
||
An entity can be cloned via :
|
||
<ul>
|
||
<li>Main menu : <i>Actions >> Clone entity</i> ;</li>
|
||
<li>Right-click contextual menu on entities diagram : <i>Entity >> Clone entity</i>
|
||
;</li>
|
||
</ul>
|
||
<br />
|
||
<img alt="Entity clone"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_entity_clone.png" />
|
||
<br /><br />
|
||
<b>Note :</b> a cloned entity has all properties from source entity. Relationships are not
|
||
cloned.
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="entity_params">Entity settings</a>
|
||
</p>
|
||
<div class="manual_div_content">
|
||
Entity parameters are accessible via <i>Entity</i> settings tab :
|
||
<br /><br />
|
||
<img alt="Entity settings"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_entity_settings.png" />
|
||
<br /><br />
|
||
This parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>Entity information (version XX)</i> :</b> entity version is incremented by
|
||
each <a href="#tag_project_state">project historic</a>.
|
||
<ul>
|
||
<li>Field <20> <i>Name</i> <20> : entity name and generated C++ class name ;</li>
|
||
<li>Field <20> <i>Table name</i> <20> : database table name mapped to the entity (uses <a
|
||
href="#project_settings">default prefix/suffix defined in project settings</a>) ;
|
||
</li>
|
||
<li>Field <20> <i>Namespace</i> <20> : namespace where entity and generated C++ class are
|
||
located, each sub-namespace must be separated by <i>::</i> characters, for example :
|
||
<i>ns1::ns2::ns3</i> ;
|
||
</li>
|
||
<li>Field <20> <i>Description</i> <20> : entity description (displayed in generated C++ source
|
||
code) ;</li>
|
||
<li>Field <20> <i>Inherit from</i> <20> : parent entity (or C++ base class) : child entity gets
|
||
automatically primary key and all properties defined in parent entity ;</li>
|
||
<li>Field <20> <i>Read only</i> <20> : if enabled, then entity is in read-only mode : QxOrm
|
||
library only allows SQL queries of type <i>SELECT</i> (<a
|
||
href="./manual.html#manual_350"><i>qx::dao</i> fetch functions of QxOrm</a>).
|
||
if enabled, then SQL queries of type <i>INSERT</i>, <i>UPDATE</i> and <i>DELETE</i> are
|
||
not available.
|
||
This parameter can be used for example to map an entity to a database view (read-only)
|
||
;</li>
|
||
<li>Field <20> <i>Abstract</i> <20> : an abstract entity is not mapped to a database table, and
|
||
generated C++ class cannot be instantiated (<a href="./manual.html#manual_510">abstract
|
||
class</a>) : this parameter can be used for example to create parent entities which
|
||
contain a list of common properties to share with all other entities ;</li>
|
||
<li>Field <20> <i>Soft delete column</i> <20> : if empty, then remove an entity from database
|
||
means delete physically the row from database.
|
||
If not empty, this field defines <a href="./manual.html#manual_3400">the database
|
||
column used to process a soft delete behaviour (or logical delete)</a> : the entity
|
||
is not physically removed in database.</li>
|
||
<li>Field <20> <i>Validator method name</i> <20> : validation function name (for example :
|
||
<i>IsValid</i>) used to validate an entity before inserting or updating it in database.
|
||
Validation method implementation must be written by the developper in its own
|
||
<i>*.cpp</i> file : see <a href="./manual.html#manual_420">QxOrm library QxValidator
|
||
module</a> for more details.
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Entity triggers</i> :</b>
|
||
<ul>
|
||
<li>Checkbox <20> <i>Before fetch</i>, <i>After fetch</i>, <i>Before insert</i>, etc... <20> :
|
||
if checked, add C++ triggers methods definition <i>onBeforeFetch()</i>,
|
||
<i>onAfterFetch()</i>, <i>onBeforeInsert()</i>, etc...
|
||
Trigger method implementation must be written by the developper in its own <i>*.cpp</i>
|
||
file : see <a href="./manual.html#manual_410">QxOrm library user manual</a> for more
|
||
details.
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Primary key property</i> :</b> fast definition of primary key (<a
|
||
href="#property_params">detailled settings of primary key is available</a>).
|
||
<ul>
|
||
<li>Field <20> <i>Name</i> <20> : primary key property name (or identifier) of entity, and data
|
||
member name in C++ class (uses <a href="#project_settings">default prefix/suffix
|
||
defined in project settings</a>) ;</li>
|
||
<li>Field <20> <i>Column name</i> <20> : primary key column name in database (if empty, then
|
||
<i>Column name</i> == <i>Name</i>).
|
||
To define <a href="./manual.html#manual_3010">a primary key on several columns
|
||
(composite key)</a>, the list of columns names must be separated by <i>|</i>
|
||
character, for example : <i>film_id|category_id</i> ;
|
||
</li>
|
||
<li>Field <20> <i>Type</i> <20> : C++ property type (default primary key type can be defined in
|
||
<a href="#project_settings">project settings screen</a>).
|
||
To define <a href="./manual.html#manual_3010">a primary key on several columns
|
||
(composite key)</a>, you must use types like : <i>boost::tuple</i>,
|
||
<i>std::tuple</i>, <i>QPair</i> or <i>std::pair</i> ;
|
||
</li>
|
||
<li>Field <20> <i>Description</i> <20> : primary key description (displayed in generated C++
|
||
source code).</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>List of properties</i> :</b> fast definition of list of properties (<a
|
||
href="#property_params">detailled settings for each property is available</a>).
|
||
This list can be manually sorted using <i>arrow up</i> and <i>arrow down</i> buttons.
|
||
<ul>
|
||
<li>Column <20> <i>Name</i> <20> : property name, and data member name in C++ source code ;</li>
|
||
<li>Column <20> <i>Type</i> <20> : C++ property type (default type can be defined in <a
|
||
href="#project_settings">project settings screen</a>) ;</li>
|
||
<li>Column <20> <i>Decoration</i> <20> : C++ decoration type (for example <a
|
||
href="./manual.html#manual_4300"><i>boost::optional</i> to manage database
|
||
<i>NULL</i> value</a>) ;</li>
|
||
<li>Column <20> <i>Collection</i> <20> : if property is a list of, then define C++ list type ;
|
||
</li>
|
||
<li>Column <20> <i>Default value</i> <20> : property default value ;</li>
|
||
<li>Column <20> <i>Index</i> <20> : define a database index to optimize <i>SELECT</i> SQL
|
||
queries ;</li>
|
||
<li>Column <20> <i>Transient</i> <20> : if enabled, then C++ data member is not mapped to a
|
||
database column (property is registered in QxOrm context but is not persistent) ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove property from the list.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>List of relationships</i> :</b> fast definition of list of relationships (<a
|
||
href="#relationship_params">detailled settings for each relationship is available</a>).
|
||
This list can be manually sorted using <i>arrow up</i> and <i>arrow down</i> buttons.
|
||
<ul>
|
||
<li>Column <20> <i>Name</i> <20> : relationship name, and data member name in C++ source code ;
|
||
</li>
|
||
<li>Column <20> <i>Target</i> <20> : target entity ;</li>
|
||
<li>Column <20> <i>n-1</i> <20> : relationship of type <i>many-to-one</i> ;</li>
|
||
<li>Column <20> <i>1-n</i> <20> : relationship of type <i>one-to-many</i> ;</li>
|
||
<li>Column <20> <i>n-n</i> <20> : relationship of type <i>many-to-many</i> ;</li>
|
||
<li>Column <20> <i>1-1</i> <20> : relationship of type <i>one-to-one</i> ;</li>
|
||
<li>Column <20> <i>Decoration</i> <20> : C++ decoration type (for relationships, QxOrm library
|
||
recommends smart-pointer : <i>boost::shared_ptr</i>, <i>std::shared_ptr</i> or
|
||
<i>QSharedPointer</i>) ;
|
||
</li>
|
||
<li>Column <20> <i>Collection</i> <20> : if relationship is a list of (<i>1-n</i> and
|
||
<i>n-n</i>), then define C++ list type ;
|
||
</li>
|
||
<li>Column <20> <i>Foreign key</i> <20> : relationship foreign key : property name of target
|
||
entity ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove relationship from the list.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>List of meta-data</i> :</b> meta-data provides a way to add and manage
|
||
extra-parameters and are available in C++ source code (<a
|
||
href="./manual.html#manual_70">QxOrm introspection engine</a>) and <a
|
||
href="#js_engine_functions_meta_data">Javascript engine to customize QxEntityEditor export
|
||
process</a>.
|
||
<ul>
|
||
<li>Column <20> <i>Key</i> <20> : meta-data key ;</li>
|
||
<li>Column <20> <i>Value</i> <20> : meta-data value ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove meta-data from the list.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="color_settings_by_item">Colors
|
||
associated to an entity</a></p>
|
||
<div class="manual_div_content">
|
||
Entity colors can be defined via right-click contextual menu <i>Define entity colors</i> :
|
||
<br /><br />
|
||
<img alt="Entity colors"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_entity_colors.png" />
|
||
<br /><br />
|
||
<b>Note :</b> items colors in the entities diagram can be defined at several levels (from the
|
||
more global level to the more specific level) :
|
||
<ul>
|
||
<li><a href="#project_settings">at projet level</a> : via main menu <i>Tools >>
|
||
Project settings</i>, <i>Colors</i> tab ;</li>
|
||
<li><a href="#color_settings_by_namespace">at namespace level</a> : via right-click
|
||
contextual menu on a namespace <i>Define colors by namespace</i> ;</li>
|
||
<li><a href="#color_settings_by_item">at item level (entity, enumeration or post-it)</a> :
|
||
via right-click contextual menu on an item <i>Define entity colors</i>.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="properties">Manage list of properties
|
||
of an entity</a></p>
|
||
<div class="manual_div_content">
|
||
A property in QxEntityEditor application is a column (of a table) from a database point of view,
|
||
and is a data member in a C++ class (registered in QxOrm context).
|
||
QxEntityEditor application provides features to create, modify, delete and sort properties of an
|
||
entity.
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="properties_actions">Add/modify/delete a property</a></p>
|
||
<div class="manual_div_content">
|
||
Add and delete a property is done via <a href="#entity_params">entity parameters screen</a> :
|
||
the <i>List of properties</i> section of this settings screen provides a way to add/remove
|
||
properties.
|
||
It is also possible to sort manually this list of properties.
|
||
<br /><br />
|
||
Modify a property is accessible via a button which is displayed on entities diagram when the
|
||
mouse is closed to a property :
|
||
<br /><br />
|
||
<img alt="Property settings access"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_property_settings_access.png" />
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="property_params">Property
|
||
settings</a></p>
|
||
<div class="manual_div_content">
|
||
Detailled property parameters are accessible via <i>Property</i> settings tab :
|
||
<br /><br />
|
||
<img alt="Property settings"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_property_settings.png" />
|
||
<br /><br />
|
||
This parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>Property information (version XX)</i> :</b> property version depends on <a
|
||
href="#tag_project_state">project historic</a>.
|
||
<ul>
|
||
<li>Field <20> <i>Name</i> <20> : property name, and data member name in C++ source code ;</li>
|
||
<li>Field <20> <i>Column name</i> <20> : database column name (if empty, then <i>Column name</i>
|
||
== <i>Name</i>) ;</li>
|
||
<li>Field <20> <i>Description</i> <20> : property description (displayed in generated C++ source
|
||
code) ;</li>
|
||
<li>Field <20> <i>Index</i> <20> : define a database index to optimize <i>SELECT</i> SQL queries
|
||
;</li>
|
||
<li>Field <20> <i>Transient</i> <20> : if enabled, then C++ data member is not mapped to a
|
||
database column (property is registered in QxOrm context but is not persistent) ;</li>
|
||
<li>Field <20> <i>Serializable</i> <20> : if enabled, property is managed by <a
|
||
href="./manual.html#manual_60">serialization engine of QxOrm library</a> ;</li>
|
||
<li>Field <20> <i>Obsolete</i> <20> : enable this option to remove a property <a
|
||
href="./manual.html#manual_605">without breaking ascendant compatibility of
|
||
serialization engine of QxOrm library</a> : property becomes private without
|
||
<i>Get/Set</i> accessors.
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Property type</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Type</i> <20> : C++ property type (default type can be defined in <a
|
||
href="#project_settings">project settings screen</a>) ;</li>
|
||
<li>Field <20> <i>Decoration</i> <20> : C++ decoration type (for example <a
|
||
href="./manual.html#manual_4300"><i>boost::optional</i> to manage database
|
||
<i>NULL</i> value</a>) ;</li>
|
||
<li>Field <20> <i>Default value</i> <20> : property default value ;</li>
|
||
<li>Field <20> <i>Collection</i> <20> : if property is a list of, then define C++ list type.
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Property validation</i> :</b> validate a property before inserting/updating
|
||
in database using <a href="./manual.html#manual_420">QxValidator module of QxOrm library</a>.
|
||
<ul>
|
||
<li>Field <20> <i>Min value</i> <20> : minimal value allowed for a property (numeric type) ;
|
||
</li>
|
||
<li>Field <20> <i>Max value</i> <20> : maximal value allowed for a property (numeric type) ;
|
||
</li>
|
||
<li>Field <20> <i>Min length</i> <20> : minimal length allowed for a property (string type) ;
|
||
</li>
|
||
<li>Field <20> <i>Max length</i> <20> : maximal length allowed for a property (string type) ;
|
||
</li>
|
||
<li>Field <20> <i>Regular expression</i> <20> : regular expression used to validate a property
|
||
value (for example, an e-mail regular expression to check if property contains a valid
|
||
e-mail address) ;</li>
|
||
<li>Field <20> <i>Not NULL</i> <20> : check if <a href="./manual.html#manual_430">property value
|
||
is not NULL</a> ;</li>
|
||
<li>Field <20> <i>Unique</i> <20> : unique value in database, 2 rows in a same table cannot have
|
||
the same value in the column mapped to current property.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Advanced</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Accessibility</i> <20>, values <20> <i>public</i>, <i>protected</i> or
|
||
<i>private</i> <20> : a <i>public</i> property is accessible without <i>Get/Set</i>
|
||
methods, a <i>protected</i> property is only accessible by inherited classes, a
|
||
<i>private</i> property is only accessible via <i>Get/Set</i> methods ;
|
||
</li>
|
||
<li>Field <20> <i>SQL type</i> <20> : QxOrm library provides <a
|
||
href="./manual.html#manual_475">a default mapping SQL type / C++ type</a>, it is
|
||
possible to override default SQL type with this parameter ;</li>
|
||
<li>Field <20> <i>SQL alias</i> <20> : force a SQL alias to database column used by QxOrm
|
||
library to build SQL queries ;</li>
|
||
<li>Field <20> <i>Format</i> <20> : define property format (<i>printf</i> syntax) for database
|
||
storage (can be useful to manage dates and times for example) ;</li>
|
||
<li>Field <20> <i>Get/Set accessors</i> <20> : if enabled, <i>Get/Set</i> accessors are
|
||
generated in C++ source code to access and modify property value ;</li>
|
||
<li>Field <20> <i>Read only</i> <20> : if enabled, only <i>Get</i> accessor is generated in C++
|
||
source code, so property becomes read-only ;</li>
|
||
<li>Field <20> <i>Get method implementation</i> <20> : provides a way to override default
|
||
<i>Get</i> method implementation in C++ source code to access property value ;
|
||
</li>
|
||
<li>Field <20> <i>Set method implementation</i> <20> : provides a way to override default
|
||
<i>Set</i> method implementation in C++ source code to modify property value.
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>List of meta-data</i> :</b> meta-data provides a way to add and manage
|
||
extra-parameters and are available in C++ source code (<a
|
||
href="./manual.html#manual_70">QxOrm introspection engine</a>) and <a
|
||
href="#js_engine_functions_meta_data">Javascript engine to customize QxEntityEditor export
|
||
process</a>.
|
||
<ul>
|
||
<li>Column <20> <i>Key</i> <20> : meta-data key ;</li>
|
||
<li>Column <20> <i>Value</i> <20> : meta-data value ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove meta-data from the list.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="relationships">Manage relationships
|
||
between entities</a></p>
|
||
<div class="manual_div_content">
|
||
A relationship between 2 entities (<i>1-n</i>, <i>n-1</i>, <i>1-1</i> or <i>n-n</i>) in
|
||
QxEntityEditor application links 2 tables in database, and links 2 classes in C++ source code.
|
||
QxEntityEditor application provides features to create, modify, delete and sort relationships of
|
||
an entity.
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="relationships_actions">Add/modify/delete a relationship</a></p>
|
||
<div class="manual_div_content">
|
||
Add and delete a relationship is done via <a href="#entity_params">entity parameters
|
||
screen</a> : the <i>List of relationships</i> section of this settings screen provides a
|
||
way to add/remove relationships.
|
||
It is also possible to sort manually this list of relationships.
|
||
<br /><br />
|
||
Modify a relationship is accessible via a button which is displayed on entities diagram when
|
||
the mouse is closed to a relationship :
|
||
<br /><br />
|
||
<img alt="Relation settings access"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_relation_settings_access.png" />
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="relationship_params">Relationship
|
||
settings</a></p>
|
||
<div class="manual_div_content">
|
||
Detailled relationship parameters are accessible via <i>Relationship</i> settings tab :
|
||
<br /><br />
|
||
<img alt="Relation settings"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_relation_settings.png" />
|
||
<br /><br />
|
||
This parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>Relationship information (version XX)</i> :</b> relationship version depends
|
||
on <a href="#tag_project_state">project historic</a>.
|
||
<ul>
|
||
<li>Field <20> <i>Name</i> <20> : relationship name, and data member name in C++ source code ;
|
||
</li>
|
||
<li>Field <20> <i>Target</i> <20> : target entity ;</li>
|
||
<li>Field <20> <i>Description</i> <20> : relationship description (displayed in generated C++
|
||
source code) ;</li>
|
||
<li>Fields <20> <i>1-n</i>, <i>n-1</i>, <i>1-1</i> or <i>n-n</i> <20> : <a
|
||
href="./manual.html#manual_380">relationship type</a>, depending on selected option,
|
||
some other fields are enabled or disabled ;</li>
|
||
<li>Field <20> <i>Column name</i> <20> : enabled only for relationships of type <i>n-1</i>,
|
||
column name in database (if empty, then <i>Column name</i> == <i>Name</i>) ;</li>
|
||
<li>Field <20> <i>Decoration</i> <20> : C++ decoration type (for relationships, QxOrm library
|
||
recommends smart-pointer : <i>boost::shared_ptr</i>, <i>std::shared_ptr</i> or
|
||
<i>QSharedPointer</i>) ;
|
||
</li>
|
||
<li>Field <20> <i>Collection</i> <20> : if relationship is a list of (<i>1-n</i> and
|
||
<i>n-n</i>), then define C++ list type ;
|
||
</li>
|
||
<li>Field <20> <i>Foreign key</i> <20> : relationship foreign key : property name of target
|
||
entity ;</li>
|
||
<li>Field <20> <i>FK owner</i> <20> : used only by <i>n-n</i> relationships ;</li>
|
||
<li>Field <20> <i>Extra-table</i> <20> : used only by <i>n-n</i> relationships, extra-table name
|
||
which links source and target entities ;</li>
|
||
<li>Field <20> <i>Index</i> <20> : define a database index to optimize <i>SELECT</i> SQL queries
|
||
;</li>
|
||
<li>Field <20> <i>Serializable</i> <20> : if enabled, relationship is managed by <a
|
||
href="./manual.html#manual_60">serialization engine of QxOrm library</a> ;</li>
|
||
<li>Field <20> <i>Obsolete</i> <20> : enable this option to remove a relationship <a
|
||
href="./manual.html#manual_605">without breaking ascendant compatibility of
|
||
serialization engine of QxOrm library</a> : relationship becomes private without
|
||
<i>Get/Set</i> accessors.
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Advanced</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Accessibility</i> <20>, values <20> <i>public</i>, <i>protected</i> or
|
||
<i>private</i> <20> : a <i>public</i> relationship is accessible without <i>Get/Set</i>
|
||
methods, a <i>protected</i> relationship is only accessible by inherited classes, a
|
||
<i>private</i> relationship is only accessible via <i>Get/Set</i> methods ;
|
||
</li>
|
||
<li>Field <20> <i>Get/Set accessors</i> <20> : if enabled, <i>Get/Set</i> accessors are
|
||
generated in C++ source code to access and modify relationship value ;</li>
|
||
<li>Field <20> <i>Read only</i> <20> : if enabled, only <i>Get</i> accessor is generated in C++
|
||
source code, so relationship becomes read-only ;</li>
|
||
<li>Field <20> <i>Get method implementation</i> <20> : provides a way to override default
|
||
<i>Get</i> method implementation in C++ source code to access relationship value ;
|
||
</li>
|
||
<li>Field <20> <i>Set method implementation</i> <20> : provides a way to override default
|
||
<i>Set</i> method implementation in C++ source code to modify relationship value.
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>List of meta-data</i> :</b> meta-data provides a way to add and manage
|
||
extra-parameters and are available in C++ source code (<a
|
||
href="./manual.html#manual_70">QxOrm introspection engine</a>) and <a
|
||
href="#js_engine_functions_meta_data">Javascript engine to customize QxEntityEditor export
|
||
process</a>.
|
||
<ul>
|
||
<li>Column <20> <i>Key</i> <20> : meta-data key ;</li>
|
||
<li>Column <20> <i>Value</i> <20> : meta-data value ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove meta-data from the list.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="enums">Manage enumerations</a></p>
|
||
<div class="manual_div_content">
|
||
An enumeration in QxEntityEditor application is a list of values available in C++ source code
|
||
(converted to a numeric value in database).
|
||
QxEntityEditor application provides features to create, modify, delete and clone enumeration.
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="enums_actions">Add/modify/delete/clone an enumeration</a></p>
|
||
<div class="manual_div_content">
|
||
Add, modify, delete and clone an enumeration is done via equivalent menu for <a
|
||
href="#entities">an entity</a> (just replace entity word by enumeration).<br />
|
||
So QxEntityEditor application provides exactly <a href="#entities">same menus as an
|
||
entity</a> to manage enumeration.
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="enumeration_params">Enumeration
|
||
settings</a></p>
|
||
<div class="manual_div_content">
|
||
Enumeration parameters are accessible via <i>Enumeration</i> settings tab :
|
||
<br /><br />
|
||
<img alt="Enumeration settings"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_enum_settings.png" />
|
||
<br /><br />
|
||
This parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>Enumeration information (version XX)</i> :</b> enumeration version is
|
||
incremented by each <a href="#tag_project_state">project historic</a>.
|
||
<ul>
|
||
<li>Field <20> <i>Name</i> <20> : enumeration name and generated C++ class name ;</li>
|
||
<li>Field <20> <i>Description</i> <20> : enumeration description (displayed in generated C++
|
||
source code) ;</li>
|
||
<li>Field <20> <i>Namespace</i> <20> : namespace where enumeration and generated C++ class are
|
||
located, each sub-namespace must be separated by <i>::</i> characters, for example :
|
||
<i>ns1::ns2::ns3</i> ;
|
||
</li>
|
||
<li>Field <20> <i>Use Qt macro Q_ENUM</i> <20> : uses <a
|
||
href="http://doc.qt.io/qt-5/qobject.html#Q_ENUM" target="_blank">Q_ENUM macro
|
||
provided by Qt framework</a> to define an enumeration compatible with Qt
|
||
introspection engine ;</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>List of values</i> :</b>
|
||
<ul>
|
||
<li>Column <20> <i>Key</i> <20> : value key ;</li>
|
||
<li>Column <20> <i>Value</i> <20> : value ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove value from the list.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>List of meta-data</i> :</b> meta-data provides a way to add and manage
|
||
extra-parameters and are available in C++ source code (<a
|
||
href="./manual.html#manual_70">QxOrm introspection engine</a>) and <a
|
||
href="#js_engine_functions_meta_data">Javascript engine to customize QxEntityEditor export
|
||
process</a>.
|
||
<ul>
|
||
<li>Column <20> <i>Key</i> <20> : meta-data key ;</li>
|
||
<li>Column <20> <i>Value</i> <20> : meta-data value ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove meta-data from the list.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="enums_colors">Colors associated to
|
||
an enumeration</a></p>
|
||
<div class="manual_div_content">
|
||
Enumeration colors can be defined via right-click contextual menu <i>Define enumeration
|
||
colors</i> :
|
||
<br /><br />
|
||
<img alt="Enumeration colors"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_enum_colors.png" />
|
||
<br /><br />
|
||
<b>Note :</b> items colors in the entities diagram can be defined at several levels (from the
|
||
more global level to the more specific level) :
|
||
<ul>
|
||
<li><a href="#project_settings">at projet level</a> : via main menu <i>Tools >>
|
||
Project settings</i>, <i>Colors</i> tab ;</li>
|
||
<li><a href="#color_settings_by_namespace">at namespace level</a> : via right-click
|
||
contextual menu on a namespace <i>Define colors by namespace</i> ;</li>
|
||
<li><a href="#color_settings_by_item">at item level (entity, enumeration or post-it)</a> :
|
||
via right-click contextual menu on an item <i>Define entity colors</i>.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="namespace">Manage namespaces</a></p>
|
||
<div class="manual_div_content">
|
||
A namespace in QxEntityEditor application is used to group several items (entities and
|
||
enumerations) in a same area.
|
||
From a database point of view, a namespace is generally a schema.
|
||
In C++ source code, a namespace defines where classes and functions are located (to group them).
|
||
<br /><br />
|
||
Namespaces are used by the following QxEntityEditor feature : <a
|
||
href="#organize_diagram_layout">Organize diagram layout</a> (to group items automatically).
|
||
<br /><br />
|
||
The QxEntityEditor application treeview (which displays all loaded items in a project) provides
|
||
some menus to manage namespaces :
|
||
<br /><br />
|
||
<img alt="Namespace menu"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_namespace_menu.png" />
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="rename_namespace">Rename a
|
||
namespace</a></p>
|
||
<div class="manual_div_content">
|
||
To rename a namespace, just do a right-click on project treeview, then contextual menu
|
||
<i>Move entities to another namespace</i> :
|
||
<br /><br />
|
||
<img alt="Namespace rename"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_namespace_rename.png" />
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="color_settings_by_namespace">Manage colors of a namespace</a></p>
|
||
<div class="manual_div_content">
|
||
To define items colors at a namespace level, just do a right-click on project treeview, then
|
||
contextual menu <i>Define colors by namespace</i> :
|
||
<br /><br />
|
||
<img alt="Namespace colors"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_namespace_colors.png" />
|
||
<br /><br />
|
||
The left part of this screen displays all namespaces available in <i>*.qxee</i>
|
||
project.<br />
|
||
The right part of this screen provides a way to manage colors for all items located in the
|
||
selected namespace.
|
||
It is also possible to define a background color (generally a light color) to group all items
|
||
in entities diagram.
|
||
<br /><br />
|
||
<b>Note :</b> items colors in the entities diagram can be defined at several levels (from the
|
||
more global level to the more specific level) :
|
||
<ul>
|
||
<li><a href="#project_settings">at projet level</a> : via main menu <i>Tools >>
|
||
Project settings</i>, <i>Colors</i> tab ;</li>
|
||
<li><a href="#color_settings_by_namespace">at namespace level</a> : via right-click
|
||
contextual menu on a namespace <i>Define colors by namespace</i> ;</li>
|
||
<li><a href="#color_settings_by_item">at item level (entity, enumeration or post-it)</a> :
|
||
via right-click contextual menu on an item <i>Define entity colors</i>.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="comment_params">Manage
|
||
post-it/comments</a></p>
|
||
<div class="manual_div_content">
|
||
A comment (or post-it) in QxEntityEditor application is a tag displayed on entities diagram to
|
||
provide some details about data model or <i>*.qxee</i> project.
|
||
A post-it can be moved everywhere in the entities diagram.
|
||
A post-it has a title and a free text area.
|
||
It is possible to write some text using HTML format to add colors, put text in bold, italic,
|
||
etc...
|
||
<br /><br />
|
||
QxEntityEditor application provides features to create, modify, delete and clone
|
||
comment/post-it.
|
||
<br /><br />
|
||
<img alt="Post-it / comments"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_post_it.png" />
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="comments_actions">Add/modify/delete/clone a post-it</a></p>
|
||
<div class="manual_div_content">
|
||
Add, modify, delete and clone a post-it is done via equivalent menu for <a
|
||
href="#entities">an entity</a> (just replace entity word by comment).<br />
|
||
So QxEntityEditor application provides exactly <a href="#entities">same menus as an
|
||
entity</a> to manage post-it.
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="comments_colors">Colors associated
|
||
to a post-it</a></p>
|
||
<div class="manual_div_content">
|
||
Post-it colors can be defined via right-click contextual menu <i>Define comment colors</i> :
|
||
<br /><br />
|
||
<img alt="Post-it colors"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_post_it_colors.png" />
|
||
<br /><br />
|
||
<b>Note :</b> items colors in the entities diagram can be defined at several levels (from the
|
||
more global level to the more specific level) :
|
||
<ul>
|
||
<li><a href="#project_settings">at projet level</a> : via main menu <i>Tools >>
|
||
Project settings</i>, <i>Colors</i> tab ;</li>
|
||
<li><a href="#color_settings_by_namespace">at namespace level</a> : via right-click
|
||
contextual menu on a namespace <i>Define colors by namespace</i> ;</li>
|
||
<li><a href="#color_settings_by_item">at item level (entity, enumeration or post-it)</a> :
|
||
via right-click contextual menu on an item <i>Define entity colors</i>.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="organize_diagram_layout">Organize
|
||
diagram layout</a></p>
|
||
<div class="manual_div_content">
|
||
A feature is available in QxEntityEditor application to group automatically all items in
|
||
entities diagram depending on namespace, and depending on relationships between entities : main
|
||
menu <i>View >> Organize diagram layout</i>.
|
||
This feature can be useful for example to organize entities diagram after executing <a
|
||
href="#import_plugins">an import process</a>.
|
||
<br /><br />
|
||
<img alt="Organize diagram layout"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_organize_diagram_layout.png" />
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="tag_project_state">Project historic
|
||
(tag project state)</a></p>
|
||
<div class="manual_div_content">
|
||
A QxEntityEditor project can have several versions/historics : main menu <i>Actions >> Tag
|
||
project state</i>.
|
||
<br /><br />
|
||
Each project historic changes project items version number (entities, properties, relationships,
|
||
etc...).
|
||
Version number is used to manage <a href="./manual.html#manual_605">ascendant compatibility with
|
||
serialization engine of QxOrm library</a>.
|
||
Project historic is also used by <a href="#ddl_export_settings">database DDL SQL export
|
||
plugin</a> : manage database schema evolution (add a table, remove a column, add an index,
|
||
etc...).
|
||
<br /><br />
|
||
<img alt="Tag project state tab 1"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_tag_project_state_01.png" />
|
||
<br /><br />
|
||
The first tab of this historic screen provides a way to create a new historic title (for example
|
||
: date/time, project version number, etc...) and a comment in free text.
|
||
<br /><br />
|
||
<img alt="Tag project state tab 2"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_tag_project_state_02.png" />
|
||
<br /><br />
|
||
The second tab of this historic screen displays the list of all project historics already saved.
|
||
This list of historics provides buttons to restore a project state in several formats (XML, JSON
|
||
or QxEntityEditor <i>*.qxee</i> project file).
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="cpp_preview_code">C++ source code
|
||
preview</a></p>
|
||
<div class="manual_div_content">
|
||
It is possible to display a preview of generated C++ source code (header <i>*.h</i> and source
|
||
<i>*.cpp</i> files) for the selected item in entities diagram (entity or enumeration).
|
||
This C++ source code can be generated by <a href="#cpp_export_settings">C++ export plugin of
|
||
QxEntityEditor</a>.
|
||
C++ preview is accessible after selecting an item in entities diagram, then go to <i>C++
|
||
preview</i> tab :
|
||
<br /><br />
|
||
<img alt="C++ preview"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_cpp_preview.png" />
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="naming_convention">Naming convention
|
||
(snake_case, camelCase)</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor application provides a feature to apply quickly a naming convention on all
|
||
project items (entities, properties, relationships, etc...).
|
||
This feature keeps (doesn't break) mapping with database. This feature is available via main
|
||
menu : <i>Naming convention</i>.
|
||
3 styles of naming convention are provided : <i>snake_case</i>, <i>camelCase</i> and
|
||
<i>PascalCase</i>.
|
||
<br /><br />
|
||
<img alt="Naming convention"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_naming_convention.png" />
|
||
<br /><br />
|
||
<b>Note :</b> this feature can be useful for example after executing <a
|
||
href="#import_plugins">an import process</a> to harmonize generated C++ source code.
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="plugin_about">List of available
|
||
plugins</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor application is based on plugins to manage <a href="#import_plugins">import</a>/<a
|
||
href="#export_plugins">export</a> process.
|
||
A list of available plugins with version number and description is available via main menu :
|
||
<i>Help >> About plugins</i>.
|
||
<br /><br />
|
||
<img alt="List of plugins"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_plugins_about.png" />
|
||
<br /><br />
|
||
</div>
|
||
</div>
|
||
|
||
<p class="manual_p_title_1"><a class="manual_a_title_1" name="import_plugins">Import plugins</a></p>
|
||
<div class="manual_div_content_1">
|
||
All import process in QxEntityEditor application are accessible via main menu <i>Import</i> :
|
||
<br /><br />
|
||
<img alt="Import plugins"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_import_plugins.png" />
|
||
<br /><br />
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="wnd_source_control_import">Import
|
||
from a directory linked to a Source Control manager (Git, Perforce, CVS, etc.)</a></p>
|
||
<div class="manual_div_content">
|
||
A QxEntityEditor project (<i>*.qxee</i> file) can be managed by a developers team : the source
|
||
code of a QxEntityEditor project can be exported/imported (manually or using command line) with
|
||
<a href="#source_control_export_settings"><b>QxEESourceControlExport</b></a> and <a
|
||
href="#wnd_source_control_import"><b>QxEESourceControlImport</b></a> plugins.<br />
|
||
<br />
|
||
Associated with a Source Control manager (Git, Perforce, CVS, etc.), these 2 plugins provide :
|
||
<ul>
|
||
<li>several people can work simultaneously on the same project ;</li>
|
||
<li>a project can easily be versioned in the source code manager ;</li>
|
||
<li>each element of a project can be compared (difference between 2 versions of the same
|
||
entity for example).</li>
|
||
</ul>
|
||
Here is a use case of <a
|
||
href="#source_control_export_settings"><b>QxEESourceControlExport</b></a> and <a
|
||
href="#wnd_source_control_import"><b>QxEESourceControlImport</b></a> plugins, with 2
|
||
developers named 'dev A' and 'dev B' (this example can be extended to X developers) :
|
||
<ul>
|
||
<li>dev A and dev B work on a same QxEntityEditor project (<i>*.qxee</i> file) ;</li>
|
||
<li>dev A creates/changes/deletes some entities in QxEntityEditor application ;</li>
|
||
<li>dev B creates/changes/deletes other entities in QxEntityEditor application ;</li>
|
||
<li>dev A and dev B export the <i>*.qxee</i> project file with the <a
|
||
href="#source_control_export_settings"><b>QxEESourceControlExport</b></a> plugin
|
||
(manually or using command line) ;</li>
|
||
<li>once the project is exported to a directory, dev A and dev B check-in (or <i>submit</i>)
|
||
all generated JSON files to the Source Control manager (Git, Perforce, CVS, etc.) on their
|
||
own branch ;</li>
|
||
<li>from the Source Control manager, dev A and dev B merge (or <i>integrate</i>) their own
|
||
branch to the development branch DEV (or MAIN or MASTER or LATEST); <b>Note :</b> even if
|
||
there are conflicts to resolve, they will be easy to correct because the JSON format is
|
||
easily readable ;</li>
|
||
<li>dev A and dev B can now get latest files from Source Control manager from DEV branch (or
|
||
MAIN or MASTER or LATEST) : these JSON files <b>contain both modifications from dev A and
|
||
dev B</b> ;</li>
|
||
<li>dev A and dev B can import these JSON files into the QxEntityEditor application using the
|
||
import plugin <a href="#wnd_source_control_import"><b>QxEESourceControlImport</b></a>
|
||
(manually or using command line).</li>
|
||
</ul>
|
||
Import plugin settings are accessible from the main menu <i>Import >> Import from Source
|
||
Control repository (Git, Perforce, CVS, etc.)</i> :
|
||
<br /><br />
|
||
<img alt="Source Control import plugin"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_import_source_control.png" />
|
||
<br /><br />
|
||
The parameter to enter corresponds to the JSON file present at the root of the directory where
|
||
<a href="#source_control_export_settings">the <i>*.qxee</i> project was exported</a>.<br />
|
||
This JSON file is named <b><i><project_name>.qxee.export.json</i></b>, for example with
|
||
the qxBlog sample project : <i>qxBlog.qxee.export.json</i>.
|
||
<br /><br />
|
||
<img alt="Source Control output directory"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_source_control_output_directory.png" />
|
||
<br /><br />
|
||
<b>Warning :</b> an import deletes all elements of the current project (entities, properties,
|
||
relationships, etc.).
|
||
<br /><br />
|
||
<b>Note :</b> It is possible to start QxEntityEditor from the command line to automatically load
|
||
a directory associated with a source code manager when the application starts.
|
||
<br /><br />
|
||
Command line example :<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --project="<path_to_your_qxee_project_file>" --plugin=QxEESourceControlImport --QxEESourceControlImport_path="<path_to_the_root_source_control_json_file>"</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="wnd_json_import">Import project based
|
||
on JSON file</a></p>
|
||
<div class="manual_div_content">
|
||
<b>
|
||
<font style="background-color:yellow">Note :</font>
|
||
</b> to work with a source code manager (Git, Perforce, CVS, etc.), it is recommended to use <a
|
||
href="#source_control_export_settings"><b>QxEESourceControlExport</b></a> and <a
|
||
href="#wnd_source_control_import"><b>QxEESourceControlImport</b></a> plugins (instead of
|
||
creating a single file).<br />
|
||
<br />
|
||
A QxEntityEditor project can be managed with a text file in JSON format : main menu <i>Import
|
||
>> Import from JSON file</i>.<br />
|
||
To know the JSON structure of a <i>*.qxee</i> project, it is recommended to do <a
|
||
href="#xml_export_settings">a first export process to JSON file</a>.
|
||
<br /><br />
|
||
<img alt="Import JSON"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_import_json.png" />
|
||
<br /><br />
|
||
The JSON import screen is simple and has only 1 field to define : the JSON file to import.
|
||
<br /><br />
|
||
<b>Warning :</b> a JSON import process removes all items from current project (entities,
|
||
properties, relationships, etc...).
|
||
<br /><br />
|
||
<b>Note :</b> QxEntityEditor application can be executed with a command-line to load
|
||
automatically a JSON file at startup.
|
||
<br /><br />
|
||
Here is a command-line example :<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --project="<path_to_your_qxee_project_file>" --plugin=QxEEJsonImport --QxEEJsonImport_file="<path_to_your_json_file>"</pre>
|
||
</i>
|
||
</div>
|
||
<br />
|
||
Here is a JSON file example (deployed in <i>./samples/qxBlog.json</i> directory of
|
||
QxEntityEditor package) :<br />
|
||
<div style="width:900px; height:500px; overflow:auto; background-color:white">
|
||
<pre>
|
||
{
|
||
"app_version": 0,
|
||
"description": "",
|
||
"dt_creation": "20131206221737",
|
||
"dt_modification": "20131206221737",
|
||
"id": 1,
|
||
"list_all_entities": [
|
||
{
|
||
"app_version": 0,
|
||
"description": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"id": 1,
|
||
"is_abstract": false,
|
||
"is_read_only": false,
|
||
"key": "",
|
||
"list_functions": null,
|
||
"list_functions_static": null,
|
||
"list_meta_data": null,
|
||
"list_properties": [
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": false,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": {
|
||
"id": 1
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 1,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": true,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "author_id",
|
||
"order_level": 0,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 1,
|
||
"list_meta_data": null,
|
||
"primitive_type": "long",
|
||
"property_id": {
|
||
"id": 1
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": {
|
||
"id": 1
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 2,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "firstname",
|
||
"order_level": 1,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 2,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QString",
|
||
"property_id": {
|
||
"id": 2
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": {
|
||
"id": 1
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 3,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "lastname",
|
||
"order_level": 2,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 3,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QString",
|
||
"property_id": {
|
||
"id": 3
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": {
|
||
"id": 1
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 4,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "birthdate",
|
||
"order_level": 3,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 4,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QDateTime",
|
||
"property_id": {
|
||
"id": 4
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": {
|
||
"id": 1
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 5,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "sex",
|
||
"order_level": 4,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": null,
|
||
"enumeration_id": {
|
||
"id": 1
|
||
},
|
||
"id": 5,
|
||
"list_meta_data": null,
|
||
"primitive_type": "sex::enum_sex",
|
||
"property_id": {
|
||
"id": 5
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": {
|
||
"id": 1
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 18,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "list_of_blog",
|
||
"order_level": 17,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "qx::QxCollection",
|
||
"decoration": "boost::shared_ptr",
|
||
"default_value": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": {
|
||
"id": 4
|
||
},
|
||
"enumeration_id": null,
|
||
"id": 18,
|
||
"list_meta_data": null,
|
||
"primitive_type": "",
|
||
"property_id": {
|
||
"id": 18
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": {
|
||
"app_version": 0,
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214144",
|
||
"extra_table": "",
|
||
"foreign_key": "author",
|
||
"foreign_key_owner": "",
|
||
"id": 2,
|
||
"inverse_property_id": {
|
||
"id": 15
|
||
},
|
||
"list_meta_data": null,
|
||
"property_id": {
|
||
"id": 18
|
||
},
|
||
"type_relation": "one-to-many",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
}
|
||
],
|
||
"name": "author",
|
||
"namespace": "",
|
||
"parent_id": null,
|
||
"project_id": {
|
||
"id": 1
|
||
},
|
||
"project_version": 0,
|
||
"property_id": {
|
||
"accessibility": "protected",
|
||
"allow_null": false,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": {
|
||
"id": 1
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 1,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": true,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "author_id",
|
||
"order_level": 0,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221810",
|
||
"dt_modification": "20140617214144",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 1,
|
||
"list_meta_data": null,
|
||
"primitive_type": "long",
|
||
"property_id": {
|
||
"id": 1
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
"soft_delete_column": "",
|
||
"table_name": "t_author",
|
||
"trigger_after_delete": false,
|
||
"trigger_after_fetch": false,
|
||
"trigger_after_insert": false,
|
||
"trigger_after_update": false,
|
||
"trigger_before_delete": false,
|
||
"trigger_before_fetch": false,
|
||
"trigger_before_insert": false,
|
||
"trigger_before_update": false,
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"validator_method": "",
|
||
"version": 0
|
||
},
|
||
{
|
||
"app_version": 0,
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"id": 4,
|
||
"is_abstract": false,
|
||
"is_read_only": false,
|
||
"key": "",
|
||
"list_functions": null,
|
||
"list_functions_static": null,
|
||
"list_meta_data": null,
|
||
"list_properties": [
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": false,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": {
|
||
"id": 4
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 12,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": true,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "blog_id",
|
||
"order_level": 11,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 12,
|
||
"list_meta_data": null,
|
||
"primitive_type": "long",
|
||
"property_id": {
|
||
"id": 12
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": false,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": {
|
||
"id": 4
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 13,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "title",
|
||
"order_level": 12,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 13,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QString",
|
||
"property_id": {
|
||
"id": 13
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": {
|
||
"id": 4
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 14,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "text",
|
||
"order_level": 13,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 14,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QString",
|
||
"property_id": {
|
||
"id": 14
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": {
|
||
"id": 4
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 15,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "author",
|
||
"order_level": 14,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "qx::QxCollection",
|
||
"decoration": "boost::shared_ptr",
|
||
"default_value": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": {
|
||
"id": 1
|
||
},
|
||
"enumeration_id": null,
|
||
"id": 15,
|
||
"list_meta_data": null,
|
||
"primitive_type": "",
|
||
"property_id": {
|
||
"id": 15
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": {
|
||
"app_version": 0,
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"extra_table": "",
|
||
"foreign_key": "",
|
||
"foreign_key_owner": "",
|
||
"id": 1,
|
||
"inverse_property_id": {
|
||
"id": 18
|
||
},
|
||
"list_meta_data": null,
|
||
"property_id": {
|
||
"id": 15
|
||
},
|
||
"type_relation": "many-to-one",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": {
|
||
"id": 4
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 16,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "list_of_comment",
|
||
"order_level": 15,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "qx::QxCollection",
|
||
"decoration": "boost::shared_ptr",
|
||
"default_value": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": {
|
||
"id": 3
|
||
},
|
||
"enumeration_id": null,
|
||
"id": 16,
|
||
"list_meta_data": null,
|
||
"primitive_type": "",
|
||
"property_id": {
|
||
"id": 16
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": {
|
||
"app_version": 0,
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"extra_table": "",
|
||
"foreign_key": "blog_id",
|
||
"foreign_key_owner": "",
|
||
"id": 3,
|
||
"inverse_property_id": {
|
||
"id": 19
|
||
},
|
||
"list_meta_data": null,
|
||
"property_id": {
|
||
"id": 16
|
||
},
|
||
"type_relation": "one-to-many",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": {
|
||
"id": 4
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 17,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "list_of_category",
|
||
"order_level": 16,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "qx::QxCollection",
|
||
"decoration": "boost::shared_ptr",
|
||
"default_value": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": {
|
||
"id": 2
|
||
},
|
||
"enumeration_id": null,
|
||
"id": 17,
|
||
"list_meta_data": null,
|
||
"primitive_type": "",
|
||
"property_id": {
|
||
"id": 17
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": {
|
||
"app_version": 0,
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"extra_table": "t_qxee_blog_category",
|
||
"foreign_key": "blog_id",
|
||
"foreign_key_owner": "category_id",
|
||
"id": 5,
|
||
"inverse_property_id": {
|
||
"id": 20
|
||
},
|
||
"list_meta_data": null,
|
||
"property_id": {
|
||
"id": 17
|
||
},
|
||
"type_relation": "many-to-many",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
}
|
||
],
|
||
"name": "blog",
|
||
"namespace": "",
|
||
"parent_id": null,
|
||
"project_id": {
|
||
"id": 1
|
||
},
|
||
"project_version": 0,
|
||
"property_id": {
|
||
"accessibility": "protected",
|
||
"allow_null": false,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": {
|
||
"id": 4
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 12,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": true,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "blog_id",
|
||
"order_level": 11,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214043",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 12,
|
||
"list_meta_data": null,
|
||
"primitive_type": "long",
|
||
"property_id": {
|
||
"id": 12
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
"soft_delete_column": "",
|
||
"table_name": "t_blog",
|
||
"trigger_after_delete": false,
|
||
"trigger_after_fetch": false,
|
||
"trigger_after_insert": false,
|
||
"trigger_after_update": false,
|
||
"trigger_before_delete": false,
|
||
"trigger_before_fetch": false,
|
||
"trigger_before_insert": false,
|
||
"trigger_before_update": false,
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"validator_method": "",
|
||
"version": 0
|
||
},
|
||
{
|
||
"app_version": 0,
|
||
"description": "",
|
||
"dt_creation": "20131206221933",
|
||
"dt_modification": "20140617214115",
|
||
"id": 2,
|
||
"is_abstract": false,
|
||
"is_read_only": false,
|
||
"key": "",
|
||
"list_functions": null,
|
||
"list_functions_static": null,
|
||
"list_meta_data": null,
|
||
"list_properties": [
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": false,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221933",
|
||
"dt_modification": "20140617214115",
|
||
"entity_id": {
|
||
"id": 2
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 6,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": true,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "category_id",
|
||
"order_level": 5,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221933",
|
||
"dt_modification": "20140617214115",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 6,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QString",
|
||
"property_id": {
|
||
"id": 6
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221933",
|
||
"dt_modification": "20140617214115",
|
||
"entity_id": {
|
||
"id": 2
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 7,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "name",
|
||
"order_level": 6,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221933",
|
||
"dt_modification": "20140617214115",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 7,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QString",
|
||
"property_id": {
|
||
"id": 7
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221933",
|
||
"dt_modification": "20140617214115",
|
||
"entity_id": {
|
||
"id": 2
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 8,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "description",
|
||
"order_level": 7,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221933",
|
||
"dt_modification": "20140617214115",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 8,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QString",
|
||
"property_id": {
|
||
"id": 8
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214115",
|
||
"entity_id": {
|
||
"id": 2
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 20,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "list_of_blog",
|
||
"order_level": 19,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "qx::QxCollection",
|
||
"decoration": "boost::shared_ptr",
|
||
"default_value": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214115",
|
||
"entity_id": {
|
||
"id": 4
|
||
},
|
||
"enumeration_id": null,
|
||
"id": 20,
|
||
"list_meta_data": null,
|
||
"primitive_type": "",
|
||
"property_id": {
|
||
"id": 20
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": {
|
||
"app_version": 0,
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20140617214115",
|
||
"extra_table": "t_qxee_blog_category",
|
||
"foreign_key": "category_id",
|
||
"foreign_key_owner": "blog_id",
|
||
"id": 6,
|
||
"inverse_property_id": {
|
||
"id": 17
|
||
},
|
||
"list_meta_data": null,
|
||
"property_id": {
|
||
"id": 20
|
||
},
|
||
"type_relation": "many-to-many",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
}
|
||
],
|
||
"name": "category",
|
||
"namespace": "",
|
||
"parent_id": null,
|
||
"project_id": {
|
||
"id": 1
|
||
},
|
||
"project_version": 0,
|
||
"property_id": {
|
||
"accessibility": "protected",
|
||
"allow_null": false,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221933",
|
||
"dt_modification": "20140617214115",
|
||
"entity_id": {
|
||
"id": 2
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 6,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": true,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "category_id",
|
||
"order_level": 5,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221933",
|
||
"dt_modification": "20140617214115",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 6,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QString",
|
||
"property_id": {
|
||
"id": 6
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
"soft_delete_column": "",
|
||
"table_name": "t_category",
|
||
"trigger_after_delete": false,
|
||
"trigger_after_fetch": false,
|
||
"trigger_after_insert": false,
|
||
"trigger_after_update": false,
|
||
"trigger_before_delete": false,
|
||
"trigger_before_fetch": false,
|
||
"trigger_before_insert": false,
|
||
"trigger_before_update": false,
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"validator_method": "",
|
||
"version": 0
|
||
},
|
||
{
|
||
"app_version": 0,
|
||
"description": "",
|
||
"dt_creation": "20131206221951",
|
||
"dt_modification": "20131206221951",
|
||
"id": 3,
|
||
"is_abstract": false,
|
||
"is_read_only": false,
|
||
"key": "",
|
||
"list_functions": null,
|
||
"list_functions_static": null,
|
||
"list_meta_data": null,
|
||
"list_properties": [
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": false,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221951",
|
||
"dt_modification": "20131206221951",
|
||
"entity_id": {
|
||
"id": 3
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 9,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": true,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "comment_id",
|
||
"order_level": 8,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221951",
|
||
"dt_modification": "20131206221951",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 9,
|
||
"list_meta_data": null,
|
||
"primitive_type": "long",
|
||
"property_id": {
|
||
"id": 9
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221951",
|
||
"dt_modification": "20131206221951",
|
||
"entity_id": {
|
||
"id": 3
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 10,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "title",
|
||
"order_level": 9,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221951",
|
||
"dt_modification": "20131206221951",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 10,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QString",
|
||
"property_id": {
|
||
"id": 10
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221951",
|
||
"dt_modification": "20131206221951",
|
||
"entity_id": {
|
||
"id": 3
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 11,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "text",
|
||
"order_level": 10,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221951",
|
||
"dt_modification": "20131206221951",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 11,
|
||
"list_meta_data": null,
|
||
"primitive_type": "QString",
|
||
"property_id": {
|
||
"id": 11
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
{
|
||
"accessibility": "protected",
|
||
"allow_null": true,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20131206222031",
|
||
"entity_id": {
|
||
"id": 3
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 19,
|
||
"is_index": false,
|
||
"is_obsolete": false,
|
||
"is_primary_key": false,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "blog_id",
|
||
"order_level": 18,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "qx::QxCollection",
|
||
"decoration": "boost::shared_ptr",
|
||
"default_value": "",
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20131206222031",
|
||
"entity_id": {
|
||
"id": 4
|
||
},
|
||
"enumeration_id": null,
|
||
"id": 19,
|
||
"list_meta_data": null,
|
||
"primitive_type": "",
|
||
"property_id": {
|
||
"id": 19
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": {
|
||
"app_version": 0,
|
||
"dt_creation": "20131206222031",
|
||
"dt_modification": "20131206222031",
|
||
"extra_table": "",
|
||
"foreign_key": "",
|
||
"foreign_key_owner": "",
|
||
"id": 4,
|
||
"inverse_property_id": {
|
||
"id": 16
|
||
},
|
||
"list_meta_data": null,
|
||
"property_id": {
|
||
"id": 19
|
||
},
|
||
"type_relation": "many-to-one",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
}
|
||
],
|
||
"name": "comment",
|
||
"namespace": "",
|
||
"parent_id": null,
|
||
"project_id": {
|
||
"id": 1
|
||
},
|
||
"project_version": 0,
|
||
"property_id": {
|
||
"accessibility": "protected",
|
||
"allow_null": false,
|
||
"app_version": 0,
|
||
"column_name": "",
|
||
"description": "",
|
||
"dt_creation": "20131206221951",
|
||
"dt_modification": "20131206221951",
|
||
"entity_id": {
|
||
"id": 3
|
||
},
|
||
"force_sql_alias": "",
|
||
"force_sql_type": "",
|
||
"format": "",
|
||
"get_method": "",
|
||
"id": 9,
|
||
"is_index": true,
|
||
"is_obsolete": false,
|
||
"is_primary_key": true,
|
||
"is_read_only": false,
|
||
"is_serializable": true,
|
||
"is_transient": false,
|
||
"is_unique": false,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"max_length": "",
|
||
"max_value": "",
|
||
"min_length": "",
|
||
"min_value": "",
|
||
"name": "comment_id",
|
||
"order_level": 8,
|
||
"project_version": 0,
|
||
"property_type_id": {
|
||
"app_version": 0,
|
||
"collection": "",
|
||
"decoration": "",
|
||
"default_value": "",
|
||
"dt_creation": "20131206221951",
|
||
"dt_modification": "20131206221951",
|
||
"entity_id": null,
|
||
"enumeration_id": null,
|
||
"id": 9,
|
||
"list_meta_data": null,
|
||
"primitive_type": "long",
|
||
"property_id": {
|
||
"id": 9
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"qt_property": "",
|
||
"reg_exp": "",
|
||
"relation_id": null,
|
||
"set_method": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0,
|
||
"write_accessors": true
|
||
},
|
||
"soft_delete_column": "",
|
||
"table_name": "t_comment",
|
||
"trigger_after_delete": false,
|
||
"trigger_after_fetch": false,
|
||
"trigger_after_insert": false,
|
||
"trigger_after_update": false,
|
||
"trigger_before_delete": false,
|
||
"trigger_before_fetch": false,
|
||
"trigger_before_insert": false,
|
||
"trigger_before_update": false,
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"validator_method": "",
|
||
"version": 0
|
||
}
|
||
],
|
||
"list_comments": [
|
||
{
|
||
"app_version": 0,
|
||
"comment_text": "- Design the entity model in few minutes\n\n- Generate C++ persistent classes automatically\n\n- Generate DDL SQL script automatically\n\n- Manage schema evolution for each project version\n\n- Compile C++ native code everywhere : Windows, Linux, MacOSX, Android, iOS, etc...\n\n- Transfer your data model over network and create quickly client/server applications",
|
||
"comment_text_html": false,
|
||
"comment_title": "qxBlog project",
|
||
"dt_creation": "20131206222130",
|
||
"dt_modification": "20140107093142",
|
||
"id": 1,
|
||
"list_meta_data": null,
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
}
|
||
],
|
||
"list_enumerations": [
|
||
{
|
||
"app_version": 0,
|
||
"description": "",
|
||
"dt_creation": "20131206221840",
|
||
"dt_modification": "20131210205552",
|
||
"id": 1,
|
||
"key": "",
|
||
"list_meta_data": null,
|
||
"list_of_key_value": {
|
||
"female": 2,
|
||
"male": 1,
|
||
"unknown": 3
|
||
},
|
||
"name": "sex",
|
||
"namespace": "",
|
||
"project_id": {
|
||
"id": 1
|
||
},
|
||
"project_version": 0,
|
||
"qt_enum": false,
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0
|
||
}
|
||
],
|
||
"list_groups": null,
|
||
"list_meta_data": null,
|
||
"list_namespaces": null,
|
||
"location": "C:/Temp/qxee",
|
||
"name": "qxBlog",
|
||
"project_guid": "{16335d56-73ac-48cf-8fcd-f74cc7d97201}",
|
||
"project_parameters": {
|
||
"app_version": 0,
|
||
"default_entity_namespace": "",
|
||
"default_primary_key_type": "long",
|
||
"default_property_type": "QString",
|
||
"dt_creation": "20131206221737",
|
||
"dt_modification": "20131206221737",
|
||
"id": 1,
|
||
"list_meta_data": null,
|
||
"lst_plugin_script": {
|
||
},
|
||
"primary_key_prefix": "",
|
||
"primary_key_suffix": "_id",
|
||
"project_id": {
|
||
"id": 1
|
||
},
|
||
"table_name_prefix": "t_",
|
||
"table_name_suffix": "",
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0
|
||
},
|
||
"user_id_creation": 0,
|
||
"user_id_modification": 0,
|
||
"version": 0
|
||
}
|
||
</pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="wnd_mysql_import">Import from MySQL
|
||
or MariaDB database</a></p>
|
||
<div class="manual_div_content">
|
||
A MySQL (or MariaDB) database structure can be imported in QxEntityEditor application via main
|
||
menu : <i>Import >> Import from MySQL (or MariaDB) database</i> :
|
||
<br /><br />
|
||
<img alt="Import MySQL or MariaDB"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_import_mysql.png" />
|
||
<br /><br />
|
||
This import parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>MySQL (or MariaDB) database connection</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Database server address (IP)</i> <20> : the MySQL server name or IP address ;
|
||
</li>
|
||
<li>Field <20> <i>Database port</i> <20> : MySQL server port number to connect to database ;</li>
|
||
<li>Field <20> <i>Database name</i> <20> : database name to import ;</li>
|
||
<li>Field <20> <i>Database login</i> <20> : user name to connect to database ;</li>
|
||
<li>Field <20> <i>Database password</i> <20> : password to connect to database ;</li>
|
||
<li>Button <20> <i>Connect to database</i> <20> : if an error occurred, a warning message is
|
||
displayed, otherwise all database tables and columns are displayed in <20> <i>Database items
|
||
to import to QxEntityEditor project</i> <20> section (treeview).</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Import settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Namespace</i> <20> : <a href="#namespace">namespace used to group all imported
|
||
items in current project</a> ;</li>
|
||
<li>Field <20> <i>Delete all entities in the namespace before importing</i> <20> : remove all
|
||
entities from above namespace before running import from database process ;</li>
|
||
<li>Field <20> <i>Import tables/columns comment to entities/properties description</i> <20> :
|
||
import tables and columns description defined in database ;</li>
|
||
<li>Field <20> <i>Add boost::optional<T> decoration if a column definition allows NULL
|
||
value</i> <20> : add automatically <a href="./manual.html#manual_4300">boost::optional
|
||
decoration to manage NULL value</a> ;</li>
|
||
<li>Field <20> <i>Import columns default value</i> <20> : import default values defined in database
|
||
columns ;</li>
|
||
<li>Field <20> <i>Organize diagram layout after import process</i> <20> : run automatically the <a
|
||
href="#organize_diagram_layout">organize entities diagram feature</a> after executing
|
||
import process.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Relationship import settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Decoration</i> <20> : default relationship C++ type decoration (for
|
||
relationships, QxOrm library recommends smart-pointer : <i>boost::shared_ptr</i>,
|
||
<i>std::shared_ptr</i> or <i>QSharedPointer</i>) ;
|
||
</li>
|
||
<li>Field <20> <i>Collection</i> <20> : if relationship is a list of (<i>1-n</i> and <i>n-n</i>),
|
||
then define C++ list type ;</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Mapping database SQL type to C++ type</i> :</b> QxEntityEditor provides a
|
||
default mapping SQL type / C++ type.
|
||
You can use this list to override default behaviour :
|
||
<ul>
|
||
<li>Column <20> <i>SQL type</i> <20> : SQL type to map. SQL type search is case insensitive, and is
|
||
applied on first characters (<i>STARTS WITH</i> behaviour) : for example, <i>varchar</i>
|
||
matches <i>VARCHAR(255)</i> ;</li>
|
||
<li>Column <20> <i>C++ type</i> <20> : C++ type to use when SQL type is found ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove SQL type / C++ type mapping.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Database items to import to QxEntityEditor project</i> :</b> when
|
||
QxEntityEditor is connected to database, all items (tables, columns, primary keys,
|
||
relationships, views, etc...) are displayed in this section.
|
||
By default, there is no item selected.
|
||
You can select all items to import with 1 click on the treeview root item.
|
||
It is also possible to select quickly items from a specific schema.
|
||
Once items to import are selected, the <20> <i>Ok</i> <20> button becomes enabled to run import
|
||
process.
|
||
<br /><br /><br />
|
||
<b>Note :</b> all import parameters (database connection, import settings and relationships, SQL
|
||
type / C++ type mapping, etc...) are automatically saved when closing the import screen.
|
||
All import parameters are automatically re-loaded when opening the import screen.
|
||
<br /><br />
|
||
<b>Other note :</b> <a href="#intro_videos">a QxEntityEditor video is available</a> to show how
|
||
to import the MySQL database sample named <i>sakila</i>.
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="wnd_postgresql_import">Import from
|
||
PostgreSQL database</a></p>
|
||
<div class="manual_div_content">
|
||
A PostgreSQL database structure can be imported in QxEntityEditor application via main menu :
|
||
<i>Import >> Import from PostgreSQL database</i> :
|
||
<br /><br />
|
||
<img alt="Import PostgreSQL"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_import_postgresql.png" />
|
||
<br /><br />
|
||
This import parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>PostgreSQL database connection</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Database server address (IP)</i> <20> : the PostgreSQL server name or IP address
|
||
;</li>
|
||
<li>Field <20> <i>Database port</i> <20> : PostgreSQL server port number to connect to database ;
|
||
</li>
|
||
<li>Field <20> <i>Database name</i> <20> : database name to import ;</li>
|
||
<li>Field <20> <i>Database login</i> <20> : user name to connect to database ;</li>
|
||
<li>Field <20> <i>Database password</i> <20> : password to connect to database ;</li>
|
||
<li>Button <20> <i>Connect to database</i> <20> : if an error occurred, a warning message is
|
||
displayed, otherwise all database tables and columns are displayed in <20> <i>Database items
|
||
to import to QxEntityEditor project</i> <20> section (treeview).</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Import settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Namespace</i> <20> : <a href="#namespace">namespace used to group all imported
|
||
items in current project</a> ;</li>
|
||
<li>Field <20> <i>Delete all entities in the namespace before importing</i> <20> : remove all
|
||
entities from above namespace before running import from database process ;</li>
|
||
<li>Field <20> <i>Import tables/columns comment to entities/properties description</i> <20> :
|
||
import tables and columns description defined in database ;</li>
|
||
<li>Field <20> <i>Add boost::optional<T> decoration if a column definition allows NULL
|
||
value</i> <20> : add automatically <a href="./manual.html#manual_4300">boost::optional
|
||
decoration to manage NULL value</a> ;</li>
|
||
<li>Field <20> <i>Import columns default value</i> <20> : import default values defined in database
|
||
columns ;</li>
|
||
<li>Field <20> <i>Organize diagram layout after import process</i> <20> : run automatically the <a
|
||
href="#organize_diagram_layout">organize entities diagram feature</a> after executing
|
||
import process.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Relationship import settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Decoration</i> <20> : default relationship C++ type decoration (for
|
||
relationships, QxOrm library recommends smart-pointer : <i>boost::shared_ptr</i>,
|
||
<i>std::shared_ptr</i> or <i>QSharedPointer</i>) ;
|
||
</li>
|
||
<li>Field <20> <i>Collection</i> <20> : if relationship is a list of (<i>1-n</i> and <i>n-n</i>),
|
||
then define C++ list type ;</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Mapping database SQL type to C++ type</i> :</b> QxEntityEditor provides a
|
||
default mapping SQL type / C++ type.
|
||
You can use this list to override default behaviour :
|
||
<ul>
|
||
<li>Column <20> <i>SQL type</i> <20> : SQL type to map. SQL type search is case insensitive, and is
|
||
applied on first characters (<i>STARTS WITH</i> behaviour) : for example, <i>varchar</i>
|
||
matches <i>VARCHAR(255)</i> ;</li>
|
||
<li>Column <20> <i>C++ type</i> <20> : C++ type to use when SQL type is found ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove SQL type / C++ type mapping.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Database items to import to QxEntityEditor project</i> :</b> when
|
||
QxEntityEditor is connected to database, all items (tables, columns, primary keys,
|
||
relationships, views, etc...) are displayed in this section.
|
||
By default, there is no item selected.
|
||
You can select all items to import with 1 click on the treeview root item.
|
||
It is also possible to select quickly items from a specific schema.
|
||
Once items to import are selected, the <20> <i>Ok</i> <20> button becomes enabled to run import
|
||
process.
|
||
<br /><br /><br />
|
||
<b>Note :</b> all import parameters (database connection, import settings and relationships, SQL
|
||
type / C++ type mapping, etc...) are automatically saved when closing the import screen.
|
||
All import parameters are automatically re-loaded when opening the import screen.
|
||
<br /><br />
|
||
<b>Other note :</b> <a href="#intro_videos">a QxEntityEditor video is available</a> to show how
|
||
to import the MySQL database sample named <i>sakila</i>.
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="wnd_sqlite_import">Import from SQLite
|
||
database</a></p>
|
||
<div class="manual_div_content">
|
||
A SQLite database structure can be imported in QxEntityEditor application via main menu :
|
||
<i>Import >> Import from SQLite database</i> :
|
||
<br /><br />
|
||
<img alt="Import SQLite"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_import_sqlite.png" />
|
||
<br /><br />
|
||
This import parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>Database connection</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Database path</i> <20> : SQLite database file path ;</li>
|
||
<li>Button <20> <i>Connect to database</i> <20> : if an error occurred, a warning message is
|
||
displayed, otherwise all database tables and columns are displayed in <20> <i>Database items
|
||
to import to QxEntityEditor project</i> <20> section (treeview).</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Import settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Namespace</i> <20> : <a href="#namespace">namespace used to group all imported
|
||
items in current project</a> ;</li>
|
||
<li>Field <20> <i>Delete all entities in the namespace before importing</i> <20> : remove all
|
||
entities from above namespace before running import from database process ;</li>
|
||
<li>Field <20> <i>Import tables/columns comment to entities/properties description</i> <20> :
|
||
import tables and columns description defined in database ;</li>
|
||
<li>Field <20> <i>Add boost::optional<T> decoration if a column definition allows NULL
|
||
value</i> <20> : add automatically <a href="./manual.html#manual_4300">boost::optional
|
||
decoration to manage NULL value</a> ;</li>
|
||
<li>Field <20> <i>Import columns default value</i> <20> : import default values defined in database
|
||
columns ;</li>
|
||
<li>Field <20> <i>Organize diagram layout after import process</i> <20> : run automatically the <a
|
||
href="#organize_diagram_layout">organize entities diagram feature</a> after executing
|
||
import process.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Relationship import settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Decoration</i> <20> : default relationship C++ type decoration (for
|
||
relationships, QxOrm library recommends smart-pointer : <i>boost::shared_ptr</i>,
|
||
<i>std::shared_ptr</i> or <i>QSharedPointer</i>) ;
|
||
</li>
|
||
<li>Field <20> <i>Collection</i> <20> : if relationship is a list of (<i>1-n</i> and <i>n-n</i>),
|
||
then define C++ list type ;</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Mapping database SQL type to C++ type</i> :</b> QxEntityEditor provides a
|
||
default mapping SQL type / C++ type.
|
||
You can use this list to override default behaviour :
|
||
<ul>
|
||
<li>Column <20> <i>SQL type</i> <20> : SQL type to map. SQL type search is case insensitive, and is
|
||
applied on first characters (<i>STARTS WITH</i> behaviour) : for example, <i>varchar</i>
|
||
matches <i>VARCHAR(255)</i> ;</li>
|
||
<li>Column <20> <i>C++ type</i> <20> : C++ type to use when SQL type is found ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove SQL type / C++ type mapping.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Database items to import to QxEntityEditor project</i> :</b> when
|
||
QxEntityEditor is connected to database, all items (tables, columns, primary keys,
|
||
relationships, views, etc...) are displayed in this section.
|
||
By default, there is no item selected.
|
||
You can select all items to import with 1 click on the treeview root item.
|
||
It is also possible to select quickly items from a specific schema.
|
||
Once items to import are selected, the <20> <i>Ok</i> <20> button becomes enabled to run import
|
||
process.
|
||
<br /><br /><br />
|
||
<b>Note :</b> all import parameters (database connection, import settings and relationships, SQL
|
||
type / C++ type mapping, etc...) are automatically saved when closing the import screen.
|
||
All import parameters are automatically re-loaded when opening the import screen.
|
||
<br /><br />
|
||
<b>Other note :</b> <a href="#intro_videos">a QxEntityEditor video is available</a> to show how
|
||
to import the MySQL database sample named <i>sakila</i>.
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="wnd_odbc_import">Import from database
|
||
using ODBC driver (Oracle, MS SQL Server, etc.)</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor application provides a generic database import using ODBC drivers : main menu
|
||
<i>Import >> Import from database using ODBC driver</i>.
|
||
This kind of import process requires <a href="https://en.wikipedia.org/wiki/Data_source_name"
|
||
target="_blank">a DSN (Data Source Name)</a> defined on the environment.
|
||
Import by ODBC process is able to manage following databases : Oracle, Microsoft SQL Server,
|
||
SQLite, MySQL/MariaDB, PostgreSQL, etc...
|
||
<br /><br />
|
||
<img alt="Import ODBC"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_import_odbc.png" />
|
||
<br /><br />
|
||
This import parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>Database connection</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>DSN or connection string</i> <20> : <a
|
||
href="https://en.wikipedia.org/wiki/Data_source_name" target="_blank">DSN (Data Source
|
||
Name)</a> defined on the environment to be able to connect to database using an ODBC
|
||
driver ;</li>
|
||
<li>Field <20> <i>Login</i> <20> : user name to connect to database (optional depending on DSN) ;
|
||
</li>
|
||
<li>Field <20> <i>Password</i> <20> : password to connect to database (optional depending on DSN) ;
|
||
</li>
|
||
<li>Field <20> <i>Database type</i> <20> : <i>Generic</i> type is able to connect to all databases
|
||
but with some limitations (no relationship, no composite key).
|
||
So you should select the real database type before connecting to database (Oracle,
|
||
Microsoft SQL Server, SQLite, MySQL/MariaDB, PostgreSQL) ;</li>
|
||
<li>Button <20> <i>Connect to database</i> <20> : if an error occurred, a warning message is
|
||
displayed, otherwise all database tables and columns are displayed in <20> <i>Database items
|
||
to import to QxEntityEditor project</i> <20> section (treeview).</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Import settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Namespace</i> <20> : <a href="#namespace">namespace used to group all imported
|
||
items in current project</a> ;</li>
|
||
<li>Field <20> <i>Delete all entities in the namespace before importing</i> <20> : remove all
|
||
entities from above namespace before running import from database process ;</li>
|
||
<li>Field <20> <i>Import tables/columns comment to entities/properties description</i> <20> :
|
||
import tables and columns description defined in database ;</li>
|
||
<li>Field <20> <i>Add boost::optional<T> decoration if a column definition allows NULL
|
||
value</i> <20> : add automatically <a href="./manual.html#manual_4300">boost::optional
|
||
decoration to manage NULL value</a> ;</li>
|
||
<li>Field <20> <i>Import columns default value</i> <20> : import default values defined in database
|
||
columns ;</li>
|
||
<li>Field <20> <i>Organize diagram layout after import process</i> <20> : run automatically the <a
|
||
href="#organize_diagram_layout">organize entities diagram feature</a> after executing
|
||
import process.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Relationship import settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Decoration</i> <20> : default relationship C++ type decoration (for
|
||
relationships, QxOrm library recommends smart-pointer : <i>boost::shared_ptr</i>,
|
||
<i>std::shared_ptr</i> or <i>QSharedPointer</i>) ;
|
||
</li>
|
||
<li>Field <20> <i>Collection</i> <20> : if relationship is a list of (<i>1-n</i> and <i>n-n</i>),
|
||
then define C++ list type ;</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Mapping database SQL type to C++ type</i> :</b> QxEntityEditor provides a
|
||
default mapping SQL type / C++ type.
|
||
You can use this list to override default behaviour :
|
||
<ul>
|
||
<li>Column <20> <i>SQL type</i> <20> : SQL type to map. SQL type search is case insensitive, and is
|
||
applied on first characters (<i>STARTS WITH</i> behaviour) : for example, <i>varchar</i>
|
||
matches <i>VARCHAR(255)</i> ;</li>
|
||
<li>Column <20> <i>C++ type</i> <20> : C++ type to use when SQL type is found ;</li>
|
||
<li>Button <20> <i>Delete</i> <20> : remove SQL type / C++ type mapping.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Database items to import to QxEntityEditor project</i> :</b> when
|
||
QxEntityEditor is connected to database, all items (tables, columns, primary keys,
|
||
relationships, views, etc...) are displayed in this section.
|
||
By default, there is no item selected.
|
||
You can select all items to import with 1 click on the treeview root item.
|
||
It is also possible to select quickly items from a specific schema.
|
||
Once items to import are selected, the <20> <i>Ok</i> <20> button becomes enabled to run import
|
||
process.
|
||
<br /><br /><br />
|
||
<b>Note :</b> all import parameters (database connection, import settings and relationships, SQL
|
||
type / C++ type mapping, etc...) are automatically saved when closing the import screen.
|
||
All import parameters are automatically re-loaded when opening the import screen.
|
||
<br /><br />
|
||
<b>Other note :</b> <a href="#intro_videos">a QxEntityEditor video is available</a> to show how
|
||
to import the MySQL database sample named <i>sakila</i>.
|
||
<br /><br />
|
||
</div>
|
||
</div>
|
||
|
||
<p class="manual_p_title_1"><a class="manual_a_title_1" name="export_plugins">Export plugins</a></p>
|
||
<div class="manual_div_content_1">
|
||
All export process in QxEntityEditor application are accessible via main menu <i>Export</i> :
|
||
<br /><br />
|
||
<img alt="Export plugins"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_plugins.png" />
|
||
<br /><br />
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="cpp_export_settings">Export to C++
|
||
project</a></p>
|
||
<div class="manual_div_content">
|
||
C++ export generates a full C++ project ready to be built (using <i>qmake</i> and/or
|
||
<i>cmake</i>) which contains all entities/properties/relationships/enumerations registered in
|
||
QxOrm context.
|
||
<a href="./manual.html">All QxOrm library features</a> (<a
|
||
href="./manual.html#manual_30">persistence</a>, <a
|
||
href="./manual.html#manual_60">serialization</a>, <a
|
||
href="./manual.html#manual_70">introspection</a>, etc...) are available for all items inside
|
||
generated C++ project.
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="cpp_export_settings_parameters">C++ export settings</a></p>
|
||
<div class="manual_div_content">
|
||
C++ export parameters are accessible via main menu : <i>Tools >> Export to C++ project
|
||
(settings)</i>.
|
||
Export parameters screen is displayed automatically when the first export is launched if no
|
||
setting is saved in <i>*.qxee</i> project.
|
||
When a C++ export process has already been executed, then export parameters screen is only
|
||
accessible via : <i>Tools >> Export to C++ project (settings)</i> :
|
||
<br /><br />
|
||
<img alt="Export C++"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_cpp.png" />
|
||
<br /><br />
|
||
This export parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>C++ export settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>C++ project location</i> <20> : define where <a
|
||
href="#cpp_export_settings_generated">generated C++ project</a> is located (output
|
||
directory).
|
||
You can define in this field a relative path to your <i>*.qxee</i> project file ;</li>
|
||
<li>Field <20> <i>Relative path to QxOrm library</i> <20> : if enabled, QxOrm library dependency
|
||
is managed using a relative path, otherwise it is managed using an absolute path.
|
||
You should define <a href="#global_settings">an environment variable in QxEntityEditor
|
||
application settings</a> (for example : <i>$$(QXORM_DIR)</i>) instead of using this
|
||
option ;</li>
|
||
<li>Field <20> <i>Generate a custom directory with custom files for each entity</i> <20> : if
|
||
enabled, generated C++ project contains a custom file per entity.
|
||
By default, these custom files are empty and will never be removed or erased by another
|
||
export.
|
||
These custom files can be used for example to implement <a
|
||
href="./manual.html#manual_420">validation methods</a>, or <a
|
||
href="./manual.html#manual_410">trigger functions</a>.</li>
|
||
<li>Field <20> <i>Generate all persistent classes using the PIMPL (Private Implementation)
|
||
idiom</i> <20> : if enabled, all generated C++ persistent classes registered into QxOrm
|
||
context will use <a href="./manual.html#manual_455">the C++ PIMPL pattern (or
|
||
d-pointer)</a>.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Custom script (Javascript file) to change the default behaviour of the
|
||
export process</i> :</b> <a href="#js_engine">settings for export custom engine</a>.
|
||
<ul>
|
||
<li>Field <20> <i>Custom script file</i> <20> : Javascript file location to <a
|
||
href="#js_engine">customize C++ export process</a>.
|
||
If empty, no customization is applied (default behaviour of export process).
|
||
You can define in this field a relative path to <i>*.qxee</i> project file, for example
|
||
<i>./my_script.js</i> if <i>my_script.js</i> file is in the same directory as
|
||
<i>*.qxee</i> file ;
|
||
</li>
|
||
<li>Button <20> <i>Debug custom Javascript file</i> <20> : if a Javascript file is defined, a
|
||
click on this button will enable <a href="#js_engine_debug">Javascript debugging
|
||
mode</a> for the next C++ export process.
|
||
Instead of using this button, you can also enable <a href="#js_engine_debug">Javascript
|
||
debugging mode</a> pressing <i>SHIFT</i> keyboard shortcut when starting an export
|
||
process.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>C++ template files</i> :</b> this section defines entities C++ source code
|
||
for <i>Header</i> <i>*.h</i> and <i>Source</i> <i>*.cpp</i> files.
|
||
Export engine is based on <i>placeholders</i> (<i>@@ACTION@@</i> format) to replace code by
|
||
calculated value.
|
||
<i>Placeholder</i> is the most important part to understand how <a
|
||
href="#js_engine">Javascript customization engine</a> works.
|
||
Please note that you can define <a href="#js_engine_placeholder">your own custom placeholder
|
||
with <i>@@CUSTOM_</i> prefix</a>, for example : <i>@@CUSTOM_MY_ACTION@@</i>.
|
||
<ul>
|
||
<li>Option <20> <i>No inheritance</i> <20> : if enabled (default option), C++ class doesn't have
|
||
any inheritance (no base class) ;</li>
|
||
<li>Option <20> <i>qx::IxPersistable</i> <20> : if enabled, each generated C++ class inherit
|
||
from <a href="manual.html#manual_450">qx::IxPersistable interface</a> (which provides a
|
||
common interface for persistence actions to database).
|
||
Please note that this option increases compilation times to build your C++ project ;
|
||
</li>
|
||
<li>Option <20> <i>qx::IxPersistable + QObject</i> <20> : if enabled, each generated C++ class
|
||
inherit from <a href="manual.html#manual_450">qx::IxPersistable interface</a> and from
|
||
<a href="http://doc.qt.io/qt-5/qobject.html" target="_blank">QObject Qt class</a>.
|
||
Please note that this option increases compilation times to build your C++ project ;
|
||
</li>
|
||
<li>Option <20> <i>Custom</i> <20> : if enabled, you can provide your own C++ template files
|
||
(you should begin to copy/past <i>Header</i> <i>*.h</i> and <i>Source</i> <i>*.cpp</i>
|
||
from another option to get a list of <i>placeholders</i> to use).</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="cpp_export_settings_generated">Overview of generated C++ project</a></p>
|
||
<div class="manual_div_content">
|
||
Output directory of generated C++ project looks like :
|
||
<br /><br />
|
||
<img alt="Export C++ output"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_cpp_output.png" />
|
||
<br /><br />
|
||
<ul>
|
||
<li><EFBFBD> <i>bin</i> <20> folder is empty by default, and will contain output binary (shared
|
||
library <i>*.dll</i> on Windows, <i>*.so</i> on Linux, etc...) ;</li>
|
||
<li><EFBFBD> <i>build</i> <20> folder is empty by default, it can be used to manage <a
|
||
href="https://cmake.org/" target="_blank">CMake configuration files</a> ;</li>
|
||
<li><EFBFBD> <i>custom</i> <20> folder is filled if the <20> <a
|
||
href="#cpp_export_settings_parameters"><i>Generate a custom directory with custom
|
||
files for each entity</i></a> <20> option is enabled.
|
||
These custom files can be used for example to implement <a
|
||
href="./manual.html#manual_420">validation methods</a>, or <a
|
||
href="./manual.html#manual_410">trigger functions</a> ;</li>
|
||
<li><EFBFBD> <i>include</i> <20> folder contains all classes definitions for entities and
|
||
enumerations ;</li>
|
||
<li><EFBFBD> <i>src</i> <20> folder contains all classes implementations for entities and
|
||
enumerations ;</li>
|
||
<li><EFBFBD> <i>CMakeLists.txt</i> <20> file can be used to build project with <a
|
||
href="https://cmake.org/" target="_blank">CMake</a> ;</li>
|
||
<li><EFBFBD> <i>*.gen.pri</i> <20> and <20> <i>*.gen.pro</i> <20> files can be used to build project with
|
||
<a href="http://doc.qt.io/qt-5/qmake-manual.html" target="_blank">qmake</a> ;
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="cpp_export_settings_compilation">Build generated C++ project (using qmake or
|
||
cmake)</a></p>
|
||
<div class="manual_div_content">
|
||
Generated C++ project can be built using <a href="https://cmake.org/"
|
||
target="_blank">CMake</a> or <a href="http://doc.qt.io/qt-5/qmake-manual.html"
|
||
target="_blank">qmake</a>.<br />
|
||
QxOrm library provides some <a href="./manual.html#manual_220">documented compilation options
|
||
in QxOrm.pri (and QxOrm.cmake) configuration files</a> (you can keep default compilation
|
||
options).<br />
|
||
QxOrm library user manual has a topic about <a href="./manual.html#manual_230">how to build a
|
||
QxOrm project</a>.<br />
|
||
A tutorial is also available to explain <a href="./tutorial_3.html">how to setup an
|
||
development environment on Windows with MSVC</a>.<br />
|
||
Once C++ project is built, then output binary is available in the <20> <i>bin</i> <20> directory of
|
||
exported project (<i>*.dll</i> on Windows, <i>*.so</i> on Linux, etc...).
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="cpp_export_settings_example">Example : how to use generated C++ project</a></p>
|
||
<div class="manual_div_content">
|
||
The <i>./samples/</i> directory of QxEntityEditor package provides a sample project :
|
||
<i>qxBlog.qxee</i>.
|
||
This <i>qxBlog.qxee</i> project can be opened in QxEntityEditor application without any valid
|
||
license key.
|
||
Once C++ project is exported by QxEntityEditor, you can build the project to get a
|
||
<i>qxBlog.dll</i> shared library (or <i>qxBlog.so</i> on Linux).
|
||
This shared library registers all entities, properties and enumerations in QxOrm context : <a
|
||
href="./manual.html">so all QxOrm library features are available</a>.
|
||
<br /><br />
|
||
The <i>./samples/</i> directory of QxEntityEditor package also provides a C++ sample project
|
||
which depends on <i>qxBlog.qxee</i> exported project : <i>qxBlogExec.zip</i>.
|
||
Once <i>qxBlogExec.zip</i> is unzipped, the <i>readme.txt</i> file in the root folder
|
||
contains instructions to build this sample project :
|
||
<br /><br />
|
||
<div style="width:900px; height:200px; overflow:auto; background-color:white">
|
||
<pre>
|
||
--------------------------------------------
|
||
-- To build qxBlogExec project with qmake --
|
||
--------------------------------------------
|
||
|
||
1- Export the 'qxBlog.qxee' project as a C++ project with QxEntityEditor and build it
|
||
2- Open the 'qxBlogExec.pro' file
|
||
3- Replace '$$(QXORM_DIR)' by your QxOrm library installation path
|
||
4- Replace 'C:/Temp/qxee/cpp/' by the path where you have exported the 'qxBlog.qxee' project as a C++ project
|
||
5- run command line : qmake
|
||
6- run command line : make debug (or make release)
|
||
|
||
|
||
--------------------------------------------
|
||
-- To build qxBlogExec project with CMake --
|
||
--------------------------------------------
|
||
|
||
1- Export the 'qxBlog.qxee' project as a C++ project with QxEntityEditor and build it
|
||
2- Open the 'CMakeLists.txt' file
|
||
3- Replace '$ENV{QXORM_DIR}' by your QxOrm library installation path
|
||
4- Replace 'C:/Temp/qxee/cpp/' by the path where you have exported the 'qxBlog.qxee' project as a C++ project
|
||
5- run cmake or cmake-gui to configure and generate your make files
|
||
</pre>
|
||
</div>
|
||
<br /><br />
|
||
Here is the commented content of <i>main()</i> function (close to <a
|
||
href="./tutorial.html">qxBlog</a> tutorial) :
|
||
<br /><br />
|
||
<div style="width:900px; height:600px; overflow:auto; background-color:white">
|
||
<pre>
|
||
<span class="type">int</span><span class="keyword"> main</span><span class="operator">(</span><span class="type">int</span> argc<span class="operator">,</span><span class="type"> char</span><span class="operator"> *</span> argv<span class="operator">[])
|
||
{</span><span class="comment">
|
||
// Qt application
|
||
</span> QCoreApplication app<span class="operator">(</span>argc<span class="operator">,</span> argv<span class="operator">);</span>
|
||
QFile<span class="operator">::</span>remove<span class="operator">(</span><span class="string">"./qxBlog.sqlite"</span><span class="operator">);</span><span class="comment">
|
||
|
||
// Parameters to connect to database
|
||
</span> qx<span class="operator">::</span>QxSqlDatabase<span class="operator">::</span>getSingleton<span class="operator">()-></span>setDriverName<span class="operator">(</span><span class="string">"QSQLITE"</span><span class="operator">);</span>
|
||
qx<span class="operator">::</span>QxSqlDatabase<span class="operator">::</span>getSingleton<span class="operator">()-></span>setDatabaseName<span class="operator">(</span><span class="string">"./qxBlog.sqlite"</span><span class="operator">);</span>
|
||
qx<span class="operator">::</span>QxSqlDatabase<span class="operator">::</span>getSingleton<span class="operator">()-></span>setHostName<span class="operator">(</span><span class="string">"localhost"</span><span class="operator">);</span>
|
||
qx<span class="operator">::</span>QxSqlDatabase<span class="operator">::</span>getSingleton<span class="operator">()-></span>setUserName<span class="operator">(</span><span class="string">"root"</span><span class="operator">);</span>
|
||
qx<span class="operator">::</span>QxSqlDatabase<span class="operator">::</span>getSingleton<span class="operator">()-></span>setPassword<span class="operator">(</span><span class="string">""</span><span class="operator">);</span><span class="comment">
|
||
|
||
// Only for debug purpose : assert if invalid offset detected fetching a relation
|
||
</span> qx<span class="operator">::</span>QxSqlDatabase<span class="operator">::</span>getSingleton<span class="operator">()-></span>setVerifyOffsetRelation<span class="operator">(</span><span class="bool">true</span><span class="operator">);</span><span class="comment">
|
||
|
||
// !!! TO CREATE TABLES, PLEASE USE THE C++ DDL SQL EXPORT PLUGIN OF QXENTITYEDITOR !!!
|
||
// Create all tables in database (you should not use 'qx::dao::create_table<T>()' function in a production software, use it just for prototypes or samples)
|
||
</span> QSqlError daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>create_table<span class="operator"><</span>author<span class="operator">>();</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>create_table<span class="operator"><</span>comment<span class="operator">>();</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>create_table<span class="operator"><</span>category<span class="operator">>();</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>create_table<span class="operator"><</span>blog<span class="operator">>();</span><span class="comment">
|
||
|
||
// Create a list of 3 author
|
||
</span> author_ptr author_1<span class="operator">;</span> author_1<span class="operator">.</span>reset<span class="operator">(</span><span class="keyword">new</span> author<span class="operator">());</span>
|
||
author_ptr author_2<span class="operator">;</span> author_2<span class="operator">.</span>reset<span class="operator">(</span><span class="keyword">new</span> author<span class="operator">());</span>
|
||
author_ptr author_3<span class="operator">;</span> author_3<span class="operator">.</span>reset<span class="operator">(</span><span class="keyword">new</span> author<span class="operator">());</span>
|
||
|
||
author_1<span class="operator">-></span>setlastname<span class="operator">(</span><span class="string">"author_1"</span><span class="operator">);</span>
|
||
author_1<span class="operator">-></span>setsex<span class="operator">(</span>sex<span class="operator">::</span>male<span class="operator">);</span>
|
||
author_1<span class="operator">-></span>setbirthdate<span class="operator">(</span>QDateTime<span class="operator">::</span>currentDateTime<span class="operator">());</span>
|
||
author_2<span class="operator">-></span>setlastname<span class="operator">(</span><span class="string">"author_2"</span><span class="operator">);</span>
|
||
author_2<span class="operator">-></span>setsex<span class="operator">(</span>sex<span class="operator">::</span>female<span class="operator">);</span>
|
||
author_2<span class="operator">-></span>setbirthdate<span class="operator">(</span>QDateTime<span class="operator">::</span>currentDateTime<span class="operator">());</span>
|
||
author_3<span class="operator">-></span>setlastname<span class="operator">(</span><span class="string">"author_3"</span><span class="operator">);</span>
|
||
author_3<span class="operator">-></span>setsex<span class="operator">(</span>sex<span class="operator">::</span>female<span class="operator">);</span>
|
||
author_3<span class="operator">-></span>setbirthdate<span class="operator">(</span>QDateTime<span class="operator">::</span>currentDateTime<span class="operator">());</span>
|
||
|
||
list_of_author authorX<span class="operator">;</span>
|
||
authorX<span class="operator">.</span>insert<span class="operator">(</span><span class="int">1</span><span class="operator">,</span> author_1<span class="operator">);</span>
|
||
authorX<span class="operator">.</span>insert<span class="operator">(</span><span class="int">2</span><span class="operator">,</span> author_2<span class="operator">);</span>
|
||
authorX<span class="operator">.</span>insert<span class="operator">(</span><span class="int">3</span><span class="operator">,</span> author_3<span class="operator">);</span><span class="comment">
|
||
|
||
// Insert list of 3 author into database
|
||
</span> daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>insert<span class="operator">(</span>authorX<span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>qx<span class="operator">::</span>dao<span class="operator">::</span>count<span class="operator"><</span>author<span class="operator">>() ==</span><span class="int"> 3</span><span class="operator">);</span><span class="comment">
|
||
|
||
// Clone author n<>2 : 'author_id_2'
|
||
</span> author_ptr author_clone<span class="operator"> =</span> qx<span class="operator">::</span>clone<span class="operator">(*</span> author_2<span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>author_clone<span class="operator">-></span>getauthor_id<span class="operator">() ==</span> author_2<span class="operator">-></span>getauthor_id<span class="operator">());</span>
|
||
qAssert<span class="operator">(</span>author_clone<span class="operator">-></span>getsex<span class="operator">() ==</span> sex<span class="operator">::</span>female<span class="operator">);</span><span class="comment">
|
||
|
||
// Create a query to fetch only female author : 'author_id_2' and 'author_id_3'
|
||
</span> qx<span class="operator">::</span>QxSqlQuery query<span class="operator">(</span><span class="string">"WHERE t_author.sex = :sex"</span><span class="operator">);</span>
|
||
query<span class="operator">.</span>bind<span class="operator">(</span><span class="string">":sex"</span><span class="operator">,</span> sex<span class="operator">::</span>female<span class="operator">);</span>
|
||
|
||
list_of_author list_of_female_author<span class="operator">;</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>fetch_by_query<span class="operator">(</span>query<span class="operator">,</span> list_of_female_author<span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>list_of_female_author<span class="operator">.</span>count<span class="operator">() ==</span><span class="int"> 2</span><span class="operator">);</span><span class="comment">
|
||
|
||
// Dump list of female author (xml serialization)
|
||
</span> qx<span class="operator">::</span>dump<span class="operator">(</span>list_of_female_author<span class="operator">);</span><span class="comment">
|
||
|
||
// Create 3 categories
|
||
</span> category_ptr category_1<span class="operator"> =</span> category_ptr<span class="operator">(</span><span class="keyword">new</span> category<span class="operator">(</span><span class="string">"cat_1"</span><span class="operator">));</span>
|
||
category_ptr category_2<span class="operator"> =</span> category_ptr<span class="operator">(</span><span class="keyword">new</span> category<span class="operator">(</span><span class="string">"cat_2"</span><span class="operator">));</span>
|
||
category_ptr category_3<span class="operator"> =</span> category_ptr<span class="operator">(</span><span class="keyword">new</span> category<span class="operator">(</span><span class="string">"cat_3"</span><span class="operator">));</span>
|
||
|
||
category_1<span class="operator">-></span>setname<span class="operator">(</span><span class="string">"category_1"</span><span class="operator">);</span> category_1<span class="operator">-></span>setdescription<span class="operator">(</span><span class="string">"desc_1"</span><span class="operator">);</span>
|
||
category_2<span class="operator">-></span>setname<span class="operator">(</span><span class="string">"category_2"</span><span class="operator">);</span> category_2<span class="operator">-></span>setdescription<span class="operator">(</span><span class="string">"desc_2"</span><span class="operator">);</span>
|
||
category_3<span class="operator">-></span>setname<span class="operator">(</span><span class="string">"category_3"</span><span class="operator">);</span> category_3<span class="operator">-></span>setdescription<span class="operator">(</span><span class="string">"desc_3"</span><span class="operator">);
|
||
|
||
{</span><span class="comment"> // Create a scope to destroy temporary connexion to database
|
||
|
||
// Open a transaction to database
|
||
</span> QSqlDatabase db<span class="operator"> =</span> qx<span class="operator">::</span>QxSqlDatabase<span class="operator">::</span>getDatabase<span class="operator">();</span><span class="type">
|
||
bool</span> bCommit<span class="operator"> =</span> db<span class="operator">.</span>transaction<span class="operator">();</span><span class="comment">
|
||
|
||
// Insert 3 categories into database, use 'db' parameter for the transaction
|
||
</span> daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>insert<span class="operator">(</span>category_1<span class="operator">, (&</span> db<span class="operator">));</span> bCommit<span class="operator"> = (</span>bCommit<span class="operator"> && !</span> daoError<span class="operator">.</span>isValid<span class="operator">());</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>insert<span class="operator">(</span>category_2<span class="operator">, (&</span> db<span class="operator">));</span> bCommit<span class="operator"> = (</span>bCommit<span class="operator"> && !</span> daoError<span class="operator">.</span>isValid<span class="operator">());</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>insert<span class="operator">(</span>category_3<span class="operator">, (&</span> db<span class="operator">));</span> bCommit<span class="operator"> = (</span>bCommit<span class="operator"> && !</span> daoError<span class="operator">.</span>isValid<span class="operator">());</span>
|
||
|
||
qAssert<span class="operator">(</span>bCommit<span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>category_1<span class="operator">-></span>getcategory_id<span class="operator">() !=</span><span class="string"> ""</span><span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>category_2<span class="operator">-></span>getcategory_id<span class="operator">() !=</span><span class="string"> ""</span><span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>category_3<span class="operator">-></span>getcategory_id<span class="operator">() !=</span><span class="string"> ""</span><span class="operator">);</span><span class="comment">
|
||
|
||
// Terminate transaction => commit or rollback if there is error
|
||
</span><span class="flow"> if</span><span class="operator"> (</span>bCommit<span class="operator">) {</span> db<span class="operator">.</span>commit<span class="operator">(); }</span><span class="flow">
|
||
else</span><span class="operator"> {</span> db<span class="operator">.</span>rollback<span class="operator">(); }
|
||
|
||
}</span><span class="comment"> // End of scope : 'db' is destroyed
|
||
|
||
// Create a blog with the class name (factory)
|
||
</span> boost<span class="operator">::</span>any blog_any<span class="operator"> =</span> qx<span class="operator">::</span>create<span class="operator">(</span><span class="string">"blog"</span><span class="operator">);</span>
|
||
blog_ptr blog_1<span class="operator">;</span><span class="flow">
|
||
try</span><span class="operator"> {</span> blog_1<span class="operator"> =</span> boost<span class="operator">::</span>any_cast<span class="operator"><</span>blog_ptr<span class="operator">>(</span>blog_any<span class="operator">); }</span><span class="flow">
|
||
catch</span><span class="operator"> (...) {</span> blog_1<span class="operator">.</span>reset<span class="operator">(</span><span class="keyword">new</span> blog<span class="operator">()); }</span>
|
||
blog_1<span class="operator">-></span>settext<span class="operator">(</span><span class="string">"blog_text_1"</span><span class="operator">);</span>
|
||
blog_1<span class="operator">-></span>settitle<span class="operator">(</span><span class="string">"blog_title_1"</span><span class="operator">);</span>
|
||
blog_1<span class="operator">-></span>setauthor<span class="operator">(</span>author_1<span class="operator">);</span><span class="comment">
|
||
|
||
// Insert 'blog_1' into database with 'save()' method
|
||
</span> daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>save<span class="operator">(</span>blog_1<span class="operator">);</span><span class="comment">
|
||
|
||
// Modify 'blog_1' properties and save into database
|
||
</span> blog_1<span class="operator">-></span>settext<span class="operator">(</span><span class="string">"update blog_text_1"</span><span class="operator">);</span>
|
||
blog_1<span class="operator">-></span>setauthor<span class="operator">(</span>author_2<span class="operator">);</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>save<span class="operator">(</span>blog_1<span class="operator">);</span><span class="comment">
|
||
|
||
// Add 2 comments to 'blog_1'
|
||
</span> comment_ptr comment_1<span class="operator">;</span> comment_1<span class="operator">.</span>reset<span class="operator">(</span><span class="keyword">new</span> comment<span class="operator">());</span>
|
||
comment_ptr comment_2<span class="operator">;</span> comment_2<span class="operator">.</span>reset<span class="operator">(</span><span class="keyword">new</span> comment<span class="operator">());</span>
|
||
|
||
comment_1<span class="operator">-></span>settext<span class="operator">(</span><span class="string">"comment_1 text"</span><span class="operator">);</span>
|
||
comment_1<span class="operator">-></span>setblog_id<span class="operator">(</span>blog_1<span class="operator">);</span>
|
||
comment_2<span class="operator">-></span>settext<span class="operator">(</span><span class="string">"comment_2 text"</span><span class="operator">);</span>
|
||
comment_2<span class="operator">-></span>setblog_id<span class="operator">(</span>blog_1<span class="operator">);</span>
|
||
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>insert<span class="operator">(</span>comment_1<span class="operator">);</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>insert<span class="operator">(</span>comment_2<span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>qx<span class="operator">::</span>dao<span class="operator">::</span>count<span class="operator"><</span>comment<span class="operator">>() ==</span><span class="int"> 2</span><span class="operator">);</span><span class="comment">
|
||
|
||
// Add 2 categories to 'blog_1' => must insert into extra-table 'category_blog'
|
||
</span> blog<span class="operator">::</span>type_list_of_category lst_category<span class="operator">;</span>
|
||
lst_category<span class="operator">.</span>insert<span class="operator">(</span>category_1<span class="operator">-></span>getcategory_id<span class="operator">(),</span> category_1<span class="operator">);</span>
|
||
lst_category<span class="operator">.</span>insert<span class="operator">(</span>category_3<span class="operator">-></span>getcategory_id<span class="operator">(),</span> category_3<span class="operator">);</span>
|
||
blog_1<span class="operator">-></span>setlist_of_category<span class="operator">(</span>lst_category<span class="operator">);</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>save_with_relation<span class="operator">(</span><span class="string">"list_of_category"</span><span class="operator">,</span> blog_1<span class="operator">);</span><span class="comment">
|
||
|
||
// Fetch blog into a new variable with all relation : 'author', 'comment' and 'category'
|
||
</span> blog_ptr blog_tmp<span class="operator">;</span> blog_tmp<span class="operator">.</span>reset<span class="operator">(</span><span class="keyword">new</span> blog<span class="operator">());</span>
|
||
blog_tmp<span class="operator">-></span>setblog_id<span class="operator">(</span>blog_1<span class="operator">-></span>getblog_id<span class="operator">());</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>fetch_by_id_with_all_relation<span class="operator">(</span>blog_tmp<span class="operator">);</span>
|
||
|
||
qAssert<span class="operator">(</span>blog_tmp<span class="operator">-></span>list_of_comment<span class="operator">().</span>count<span class="operator">() ==</span><span class="int"> 2</span><span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>blog_tmp<span class="operator">-></span>list_of_category<span class="operator">().</span>count<span class="operator">() ==</span><span class="int"> 2</span><span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>blog_tmp<span class="operator">-></span>gettext<span class="operator">() ==</span><span class="string"> "update blog_text_1"</span><span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>blog_tmp<span class="operator">-></span>getauthor<span class="operator">() &&</span> blog_tmp<span class="operator">-></span>getauthor<span class="operator">()-></span>getauthor_id<span class="operator">() ==</span> author_2<span class="operator">-></span>getauthor_id<span class="operator">());</span><span class="comment">
|
||
|
||
// Fetch blog into a new variable with many relations using "*->*->*->*" (4 levels of relationships)
|
||
</span> blog_tmp<span class="operator">.</span>reset<span class="operator">(</span><span class="keyword">new</span> blog<span class="operator">());</span>
|
||
blog_tmp<span class="operator">-></span>setblog_id<span class="operator">(</span>blog_1<span class="operator">-></span>getblog_id<span class="operator">());</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>fetch_by_id_with_relation<span class="operator">(</span><span class="string">"*->*->*->*"</span><span class="operator">,</span> blog_tmp<span class="operator">);</span>
|
||
|
||
qAssert<span class="operator">(</span>blog_tmp<span class="operator">-></span>list_of_comment<span class="operator">().</span>count<span class="operator">() ==</span><span class="int"> 2</span><span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>blog_tmp<span class="operator">-></span>list_of_category<span class="operator">().</span>count<span class="operator">() ==</span><span class="int"> 2</span><span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>blog_tmp<span class="operator">-></span>gettext<span class="operator">() ==</span><span class="string"> "update blog_text_1"</span><span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>blog_tmp<span class="operator">-></span>getauthor<span class="operator">() &&</span> blog_tmp<span class="operator">-></span>getauthor<span class="operator">()-></span>getauthor_id<span class="operator">() ==</span> author_2<span class="operator">-></span>getauthor_id<span class="operator">());</span><span class="comment">
|
||
|
||
// Dump 'blog_tmp' result from database (xml serialization)
|
||
</span> qx<span class="operator">::</span>dump<span class="operator">(</span>blog_tmp<span class="operator">);</span><span class="comment">
|
||
|
||
// Check qx::dao::save_with_relation_recursive() function
|
||
</span> daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>save_with_relation_recursive<span class="operator">(</span>blog_tmp<span class="operator">);</span>
|
||
qAssert<span class="operator">(!</span> daoError<span class="operator">.</span>isValid<span class="operator">());</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>save_with_relation_recursive<span class="operator">(</span>blog_tmp<span class="operator">,</span> qx<span class="operator">::</span>dao<span class="operator">::</span>save_mode<span class="operator">::</span>e_update_only<span class="operator">);</span>
|
||
qAssert<span class="operator">(!</span> daoError<span class="operator">.</span>isValid<span class="operator">());</span><span class="comment">
|
||
|
||
// Call 'age()' method with class name and method name (reflexion)
|
||
//qx_bool bInvokeOk = qx::QxClassX::invoke("author", "age", author_1);
|
||
//qAssert(bInvokeOk);
|
||
|
||
// Test 'isDirty()' method
|
||
</span> qx<span class="operator">::</span>dao<span class="operator">::</span>ptr<span class="operator"><</span>blog<span class="operator">></span> blog_isdirty<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>ptr<span class="operator"><</span>blog<span class="operator">>(</span><span class="keyword">new</span> blog<span class="operator">());</span>
|
||
blog_isdirty<span class="operator">-></span>setblog_id<span class="operator">(</span>blog_1<span class="operator">-></span>getblog_id<span class="operator">());</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>fetch_by_id<span class="operator">(</span>blog_isdirty<span class="operator">);</span>
|
||
qAssert<span class="operator">(!</span> daoError<span class="operator">.</span>isValid<span class="operator">() && !</span> blog_isdirty<span class="operator">.</span>isDirty<span class="operator">());</span>
|
||
|
||
blog_isdirty<span class="operator">-></span>settext<span class="operator">(</span><span class="string">"blog property 'text' modified => blog is dirty !!!"</span><span class="operator">);</span>
|
||
QStringList lstDiff<span class="operator">;</span><span class="type"> bool</span> bDirty<span class="operator"> =</span> blog_isdirty<span class="operator">.</span>isDirty<span class="operator">(</span>lstDiff<span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>bDirty<span class="operator"> && (</span>lstDiff<span class="operator">.</span>count<span class="operator">() ==</span><span class="int"> 1</span><span class="operator">) && (</span>lstDiff<span class="operator">.</span>at<span class="operator">(</span><span class="int">0</span><span class="operator">) ==</span><span class="string"> "text"</span><span class="operator">));</span><span class="flow">
|
||
if</span><span class="operator"> (</span>bDirty<span class="operator">) {</span> qDebug<span class="operator">(</span><span class="string">"[QxOrm] test dirty 1 : blog is dirty => '%s'"</span><span class="operator">,</span> qPrintable<span class="operator">(</span>lstDiff<span class="operator">.</span>join<span class="operator">(</span><span class="string">"|"</span><span class="operator">))); }</span><span class="comment">
|
||
|
||
// Update only property 'm_text' of 'blog_isdirty'
|
||
</span> daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>update_optimized<span class="operator">(</span>blog_isdirty<span class="operator">);</span>
|
||
qAssert<span class="operator">(!</span> daoError<span class="operator">.</span>isValid<span class="operator">() && !</span> blog_isdirty<span class="operator">.</span>isDirty<span class="operator">());</span>
|
||
qx<span class="operator">::</span>dump<span class="operator">(</span>blog_isdirty<span class="operator">);</span><span class="comment">
|
||
|
||
// Test 'isDirty()' method with a container
|
||
</span><span class="keyword"> typedef</span> qx<span class="operator">::</span>dao<span class="operator">::</span>ptr<span class="operator"><</span> QList<span class="operator"><</span>author_ptr<span class="operator">> ></span> type_lst_author_test_is_dirty<span class="operator">;</span>
|
||
type_lst_author_test_is_dirty container_isdirty<span class="operator"> =</span> type_lst_author_test_is_dirty<span class="operator">(</span><span class="keyword">new</span> QList<span class="operator"><</span>author_ptr<span class="operator">>());</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>fetch_all<span class="operator">(</span>container_isdirty<span class="operator">);</span>
|
||
qAssert<span class="operator">(!</span> daoError<span class="operator">.</span>isValid<span class="operator">() && !</span> container_isdirty<span class="operator">.</span>isDirty<span class="operator">() && (</span>container_isdirty<span class="operator">-></span>count<span class="operator">() ==</span><span class="int"> 3</span><span class="operator">));</span>
|
||
|
||
author_ptr author_ptr_dirty<span class="operator"> =</span> container_isdirty<span class="operator">-></span>at<span class="operator">(</span><span class="int">1</span><span class="operator">);</span>
|
||
author_ptr_dirty<span class="operator">-></span>setlastname<span class="operator">(</span><span class="string">"author name modified at index 1 => container is dirty !!!"</span><span class="operator">);</span>
|
||
bDirty<span class="operator"> =</span> container_isdirty<span class="operator">.</span>isDirty<span class="operator">(</span>lstDiff<span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>bDirty<span class="operator"> && (</span>lstDiff<span class="operator">.</span>count<span class="operator">() ==</span><span class="int"> 1</span><span class="operator">));</span><span class="flow">
|
||
if</span><span class="operator"> (</span>bDirty<span class="operator">) {</span> qDebug<span class="operator">(</span><span class="string">"[QxOrm] test dirty 2 : container is dirty => '%s'"</span><span class="operator">,</span> qPrintable<span class="operator">(</span>lstDiff<span class="operator">.</span>join<span class="operator">(</span><span class="string">"|"</span><span class="operator">))); }</span>
|
||
|
||
author_ptr_dirty<span class="operator"> =</span> container_isdirty<span class="operator">-></span>at<span class="operator">(</span><span class="int">2</span><span class="operator">);</span>
|
||
author_ptr_dirty<span class="operator">-></span>setfirstname<span class="operator">(</span><span class="string">"firstname changed"</span><span class="operator">);</span>
|
||
bDirty<span class="operator"> =</span> container_isdirty<span class="operator">.</span>isDirty<span class="operator">(</span>lstDiff<span class="operator">);</span>
|
||
qAssert<span class="operator">(</span>bDirty<span class="operator"> && (</span>lstDiff<span class="operator">.</span>count<span class="operator">() ==</span><span class="int"> 2</span><span class="operator">));</span><span class="flow">
|
||
if</span><span class="operator"> (</span>bDirty<span class="operator">) {</span> qDebug<span class="operator">(</span><span class="string">"[QxOrm] test dirty 3 : container is dirty => '%s'"</span><span class="operator">,</span> qPrintable<span class="operator">(</span>lstDiff<span class="operator">.</span>join<span class="operator">(</span><span class="string">"|"</span><span class="operator">))); }</span><span class="comment">
|
||
|
||
// Update only property 'm_name' at position 1, only property 'm_birthdate' at position 2 and nothing at position 0
|
||
</span> daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>update_optimized<span class="operator">(</span>container_isdirty<span class="operator">);</span>
|
||
qAssert<span class="operator">(!</span> daoError<span class="operator">.</span>isValid<span class="operator">() && !</span> container_isdirty<span class="operator">.</span>isDirty<span class="operator">());</span>
|
||
qx<span class="operator">::</span>dump<span class="operator">(</span>container_isdirty<span class="operator">);</span><span class="comment">
|
||
|
||
// Fetch only property 'm_text' of blog
|
||
</span> QStringList lstColumns<span class="operator"> =</span> QStringList<span class="operator">() <<</span><span class="string"> "text"</span><span class="operator">;</span>
|
||
QList<span class="operator"><</span>blog_ptr<span class="operator">></span> lst_blog_with_only_text<span class="operator">;</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>fetch_all<span class="operator">(</span>lst_blog_with_only_text<span class="operator">,</span> NULL<span class="operator">,</span> lstColumns<span class="operator">);</span>
|
||
qAssert<span class="operator">(!</span> daoError<span class="operator">.</span>isValid<span class="operator">() && (</span>lst_blog_with_only_text<span class="operator">.</span>size<span class="operator">() ></span><span class="int"> 0</span><span class="operator">));</span><span class="flow">
|
||
if</span><span class="operator"> ((</span>lst_blog_with_only_text<span class="operator">.</span>size<span class="operator">() ></span><span class="int"> 0</span><span class="operator">) && (</span>lst_blog_with_only_text<span class="operator">[</span><span class="int">0</span><span class="operator">].</span>get<span class="operator">() !=</span> NULL<span class="operator">))
|
||
{</span> qAssert<span class="operator">(</span>lst_blog_with_only_text<span class="operator">[</span><span class="int">0</span><span class="operator">]-></span>gettitle<span class="operator">().</span>isEmpty<span class="operator">()); }</span>
|
||
qx<span class="operator">::</span>dump<span class="operator">(</span>lst_blog_with_only_text<span class="operator">);</span><span class="comment">
|
||
|
||
// Dump all registered classes into QxOrm context (introspection engine)
|
||
</span> qx<span class="operator">::</span>QxClassX<span class="operator">::</span>dumpAllClasses<span class="operator">();</span><span class="comment">
|
||
|
||
// Call a custom SQL query or a stored procedure
|
||
</span> qx_query testStoredProc<span class="operator">(</span><span class="string">"SELECT * FROM t_author"</span><span class="operator">);</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>call_query<span class="operator">(</span>testStoredProc<span class="operator">);</span>
|
||
qAssert<span class="operator">(!</span> daoError<span class="operator">.</span>isValid<span class="operator">());</span>
|
||
testStoredProc<span class="operator">.</span>dumpSqlResult<span class="operator">();</span><span class="comment">
|
||
|
||
// Call a custom SQL query or a stored procedure and fetch automatically properties (with a collection of items)
|
||
</span> qx_query testStoredProcBis<span class="operator">(</span><span class="string">"SELECT * FROM t_author"</span><span class="operator">);</span>
|
||
authorX<span class="operator">.</span>clear<span class="operator">();</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>execute_query<span class="operator">(</span>testStoredProcBis<span class="operator">,</span> authorX<span class="operator">);</span>
|
||
qAssert<span class="operator">(!</span> daoError<span class="operator">.</span>isValid<span class="operator">());</span> qAssert<span class="operator">(</span>authorX<span class="operator">.</span>count<span class="operator">() ></span><span class="int"> 0</span><span class="operator">);</span>
|
||
qx<span class="operator">::</span>dump<span class="operator">(</span>authorX<span class="operator">);</span><span class="comment">
|
||
|
||
// Call a custom SQL query or a stored procedure and fetch automatically properties
|
||
</span> qx_query testStoredProcThird<span class="operator">(</span><span class="string">"SELECT name, category_id FROM t_category"</span><span class="operator">);</span>
|
||
category_ptr category_tmp<span class="operator"> =</span> category_ptr<span class="operator">(</span><span class="keyword">new</span> category<span class="operator">());</span>
|
||
daoError<span class="operator"> =</span> qx<span class="operator">::</span>dao<span class="operator">::</span>execute_query<span class="operator">(</span>testStoredProcThird<span class="operator">,</span> category_tmp<span class="operator">);</span>
|
||
qAssert<span class="operator">(!</span> daoError<span class="operator">.</span>isValid<span class="operator">());</span> qAssert<span class="operator">(</span>category_tmp<span class="operator">-></span>getcategory_id<span class="operator">() !=</span><span class="string"> ""</span><span class="operator">);</span>
|
||
qx<span class="operator">::</span>dump<span class="operator">(</span>category_tmp<span class="operator">);</span><span class="flow">
|
||
|
||
return</span><span class="int"> 0</span><span class="operator">;
|
||
}</span>
|
||
</pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2"
|
||
name="cpp_model_view_export_settings">Export to C++ model/view project</a></p>
|
||
<div class="manual_div_content">
|
||
QxOrm library provides <a href="../doxygen/html/group___qx_model_view.html"
|
||
target="_blank">QxModelView module</a>.
|
||
A documentation about QxModelView module is available in the <a
|
||
href="./manual.html#manual_90">QxOrm library user manual</a>.
|
||
<a href="../doxygen/html/group___qx_model_view.html" target="_blank">QxModelView module</a>
|
||
provides a way to work with <a href="http://doc.qt.io/qt-5/modelview.html" target="_blank">Qt
|
||
model/view engine</a> with all classes registered in QxOrm context :
|
||
<ul>
|
||
<li><a href="./manual.html#manual_940">QML</a> : each property defined in QxOrm context is
|
||
exposed to QML engine : <b><a href="../doxygen/html/group___qx_model_view.html"
|
||
target="_blank">QxModelView</a></b> module makes easier integration between QML and
|
||
databases ;</li>
|
||
<li><a href="./manual.html#manual_950">Qt widgets</a> : <i>QTableView</i> or <i>QListView</i>
|
||
for example to display/modify a database table content.</li>
|
||
</ul>
|
||
<br />
|
||
QxEntityEditor application is able to generate a full C++ model/view project ready to be built :
|
||
so all entities and their relationships are accessible in QML views.
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="cpp_model_view_export_settings_parameters">Export settings</a></p>
|
||
<div class="manual_div_content">
|
||
C++ model/view export parameters are accessible via main menu : <i>Tools >> Export to
|
||
C++ model/view project (settings)</i>.
|
||
Export parameters screen is displayed automatically when the first export is launched if no
|
||
setting is saved in <i>*.qxee</i> project.
|
||
When a C++ model/view export process has already been executed, then export parameters screen
|
||
is only accessible via : <i>Tools >> Export to C++ model/view project (settings)</i> :
|
||
<br /><br />
|
||
<img alt="Export C++ model/view"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_cpp_model_view.png" />
|
||
<br /><br />
|
||
This export parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>C++ model/view export settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>C++ model/view project location</i> <20> : output directory which contains <a
|
||
href="#cpp_model_view_export_settings_generated">C++ model/view project files</a>.
|
||
You can define in this field a relative path to your <i>*.qxee</i> project file ;</li>
|
||
<li>Field <20> <i>C++ entities project location</i> <20> : read-only, displays the <a
|
||
href="#cpp_export_settings">C++ project</a> location (entities registered in QxOrm
|
||
context) whose depends C++ model/view project ;</li>
|
||
<li>Field <20> <i>Namespace for model/view</i> <20> : namespace used to group all C++ model/view
|
||
classes (these classes implement <a href="../doxygen/html/classqx_1_1_ix_model.html"
|
||
target="_blank">qx::IxModel</a> interface) ;</li>
|
||
<li>Field <20> <i>Generate custom files</i> <20> : if enabled, generated C++ project contains a
|
||
custom file per entity.
|
||
By default, these custom files are empty and will never be removed or erased by another
|
||
export.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Custom script (Javascript file) to change the default behaviour of the
|
||
export process</i> :</b> <a href="#js_engine">settings for export custom engine</a>.
|
||
<ul>
|
||
<li>Field <20> <i>Custom script file</i> <20> : Javascript file location to <a
|
||
href="#js_engine">customize C++ export process</a>.
|
||
If empty, no customization is applied (default behaviour of export process).
|
||
You can define in this field a relative path to <i>*.qxee</i> project file, for example
|
||
<i>./my_script.js</i> if <i>my_script.js</i> file is in the same directory as
|
||
<i>*.qxee</i> file ;
|
||
</li>
|
||
<li>Button <20> <i>Debug custom Javascript file</i> <20> : if a Javascript file is defined, a
|
||
click on this button will enable <a href="#js_engine_debug">Javascript debugging
|
||
mode</a> for the next C++ export process.
|
||
Instead of using this button, you can also enable <a href="#js_engine_debug">Javascript
|
||
debugging mode</a> pressing <i>SHIFT</i> keyboard shortcut when starting an export
|
||
process.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>C++ model/view template files</i> :</b> this section defines model/view C++
|
||
source code for <i>Header</i> <i>*.h</i> and <i>Source</i> <i>*.cpp</i> files.
|
||
Export engine is based on <i>placeholders</i> (<i>@@ACTION@@</i> format) to replace code by
|
||
calculated value.
|
||
<i>Placeholder</i> is the most important part to understand how <a
|
||
href="#js_engine">Javascript customization engine</a> works.
|
||
Please note that you can define <a href="#js_engine_placeholder">your own custom placeholder
|
||
with <i>@@CUSTOM_</i> prefix</a>, for example : <i>@@CUSTOM_MY_ACTION@@</i>.
|
||
<ul>
|
||
<li>Option <20> <i>Default</i> <20> : if enabled (default option), generated models inherit from
|
||
<a href="../doxygen/html/classqx_1_1_ix_model.html"
|
||
target="_blank">qx::QxModel<T></a> class (models can execute SQL queries, <a
|
||
href="./manual.html#manual_940">even in QML views</a>) ;
|
||
</li>
|
||
<li>Option <20> <i>qx::QxModelService<T, S></i> <20> : if enabled, generated models
|
||
inherit from <a href="../doxygen/html/classqx_1_1_qx_model_service.html"
|
||
target="_blank">qx::QxModelService<T, S></a> (models can <a
|
||
href="./manual.html#manual_960">execute client-server requests with QxService
|
||
module</a>, <a href="./manual.html#manual_940">even in QML views</a>) ;</li>
|
||
<li>Option <20> <i>Custom</i> <20> : if enabled, you can provide your own C++ model/view
|
||
template files (you should begin to copy/past <i>Header</i> <i>*.h</i> and
|
||
<i>Source</i> <i>*.cpp</i> from another option to get a list of <i>placeholders</i> to
|
||
use).
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="cpp_model_view_export_settings_generated">Overview of generated project</a></p>
|
||
<div class="manual_div_content">
|
||
Output directory of generated C++ model/view project looks like :
|
||
<br /><br />
|
||
<img alt="Export C++ model/view output"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_cpp_model_view_output.png" />
|
||
<br /><br />
|
||
<ul>
|
||
<li><EFBFBD> <i>bin</i> <20> folder is empty by default, and will contain output binary (shared
|
||
library <i>*.dll</i> on Windows, <i>*.so</i> on Linux, etc...) ;</li>
|
||
<li><EFBFBD> <i>build</i> <20> folder is empty by default, it can be used to manage <a
|
||
href="https://cmake.org/" target="_blank">CMake configuration files</a> ;</li>
|
||
<li><EFBFBD> <i>custom</i> <20> folder is filled if the <20> <a
|
||
href="#cpp_model_view_export_settings_parameters"><i>Generate custom files</i></a> <20>
|
||
option is enabled ;</li>
|
||
<li><EFBFBD> <i>include</i> <20> folder contains all models definitions for entities and their
|
||
relationships ;</li>
|
||
<li><EFBFBD> <i>src</i> <20> folder contains all models implementations for entities and their
|
||
relationships ;</li>
|
||
<li><EFBFBD> <i>CMakeLists.txt</i> <20> file can be used to build model/view project with <a
|
||
href="https://cmake.org/" target="_blank">CMake</a> ;</li>
|
||
<li><EFBFBD> <i>*.gen.pri</i> <20> and <20> <i>*.gen.pro</i> <20> files can be used to build model/view
|
||
project with <a href="http://doc.qt.io/qt-5/qmake-manual.html"
|
||
target="_blank">qmake</a> ;</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="cpp_services_export_settings">Export
|
||
to C++ services project</a></p>
|
||
<div class="manual_div_content">
|
||
QxOrm library provides <a href="../doxygen/html/group___qx_service.html"
|
||
target="_blank">QxService module</a>.
|
||
A documentation about QxService module is available in <a href="./manual.html#manual_80">QxOrm
|
||
library user manual</a>.
|
||
<a href="../doxygen/html/group___qx_service.html" target="_blank">QxService module</a> of QxOrm
|
||
library provides a way to create quickly a powerful <b>C++ applications server</b> (based on
|
||
<i>services</i> with <i>request</i> from client and <i>response</i> from server).
|
||
<a href="./tutorial_2.html">A tutorial is available on QxOrm website</a> to explain how to work
|
||
with <a href="../doxygen/html/group___qx_service.html" target="_blank">QxService module</a>.
|
||
<br /><br />
|
||
QxEntityEditor application is able to generate a full C++ services project ready to be built (a
|
||
C++ project to manage client layer and a C++ project to publish services on server side) : so
|
||
all entities and their relationships can be transfered over network (client/server application).
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="cpp_services_export_settings_parameters">Export settings</a></p>
|
||
<div class="manual_div_content">
|
||
C++ services export parameters are accessible via main menu : <i>Tools >> Export to C++
|
||
services project (settings)</i>.
|
||
Export parameters screen is displayed automatically when the first export is launched if no
|
||
setting is saved in <i>*.qxee</i> project.
|
||
When a C++ services export process has already been executed, then export parameters screen
|
||
is only accessible via : <i>Tools >> Export to C++ services project (settings)</i> :
|
||
<br /><br />
|
||
<img alt="Export C++ services"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_cpp_services.png" />
|
||
<br /><br />
|
||
This export parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>C++ services export settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>C++ services project location</i> <20> : output directory which contains <a
|
||
href="#cpp_services_export_settings_generated">all C++ services project files</a>.
|
||
You can define in this field a relative path to your <i>*.qxee</i> project file ;</li>
|
||
<li>Field <20> <i>C++ entities project location</i> <20> : read-only, displays the <a
|
||
href="#cpp_export_settings">C++ project</a> location (entities registered in QxOrm
|
||
context) whose depends C++ services project ;</li>
|
||
<li>Field <20> <i>Namespace for services</i> <20> : namespace used to group all C++ services
|
||
classes (these classes provide a way <a href="./manual.html#manual_80">to transfer
|
||
entities over network</a>, client layer and server layer) ;</li>
|
||
<li>Field <20> <i>Generate custom files</i> <20> : if enabled, generated C++ project contains a
|
||
custom file per entity.
|
||
By default, these custom files are empty and will never be removed or erased by another
|
||
export.
|
||
These custom files can be used for example to implement and publish new services ;</li>
|
||
<li>Field <20> <i>Generate server application</i> <20> : if enabled, <a
|
||
href="#cpp_services_export_settings_server_app">a sample C++ applications server
|
||
project</a> is generated and is able to load and publish services on server side
|
||
based on plugins ;</li>
|
||
<li>Field <20> <i>Server application location</i> <20> : if <20> <i>Generate server application</i>
|
||
<20> option is enabled, then define output directory of <a
|
||
href="#cpp_services_export_settings_server_app">sample C++ applications server
|
||
project</a>.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Custom script (Javascript file) to change the default behaviour of the
|
||
export process</i> :</b> <a href="#js_engine">settings for export custom engine</a>.
|
||
<ul>
|
||
<li>Field <20> <i>Custom script file</i> <20> : Javascript file location to <a
|
||
href="#js_engine">customize C++ export process</a>.
|
||
If empty, no customization is applied (default behaviour of export process).
|
||
You can define in this field a relative path to <i>*.qxee</i> project file, for example
|
||
<i>./my_script.js</i> if <i>my_script.js</i> file is in the same directory as
|
||
<i>*.qxee</i> file ;
|
||
</li>
|
||
<li>Button <20> <i>Debug custom Javascript file</i> <20> : if a Javascript file is defined, a
|
||
click on this button will enable <a href="#js_engine_debug">Javascript debugging
|
||
mode</a> for the next C++ export process.
|
||
Instead of using this button, you can also enable <a href="#js_engine_debug">Javascript
|
||
debugging mode</a> pressing <i>SHIFT</i> keyboard shortcut when starting an export
|
||
process.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>C++ services template files</i> :</b> this section defines services C++
|
||
source code for <i>Header</i> <i>*.h</i> and <i>Source</i> <i>*.cpp</i> files (client and
|
||
server).
|
||
Export engine is based on <i>placeholders</i> (<i>@@ACTION@@</i> format) to replace code by
|
||
calculated value.
|
||
<i>Placeholder</i> is the most important part to understand how <a
|
||
href="#js_engine">Javascript customization engine</a> works.
|
||
Please note that you can define <a href="#js_engine_placeholder">your own custom placeholder
|
||
with <i>@@CUSTOM_</i> prefix</a>, for example : <i>@@CUSTOM_MY_ACTION@@</i>.
|
||
<ul>
|
||
<li>Option <20> <i>Default</i> <20> : if enabled (default option), generate default services
|
||
(client layer and server layer) : entities and their relationships can be transfered
|
||
over network and <i>CRUD</i> operations on database are supported ;</li>
|
||
<li>Option <20> <i>Custom</i> <20> : if enabled, you can provide your own C++ services template
|
||
files (you should begin to copy/past <i>Header</i> <i>*.h</i> and <i>Source</i>
|
||
<i>*.cpp</i> from another option to get a list of <i>placeholders</i> to use).
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="cpp_services_export_settings_generated">Overview of generated project</a></p>
|
||
<div class="manual_div_content">
|
||
Output directory of generated C++ services project (client and server) looks like :
|
||
<br /><br />
|
||
<img alt="Export C++ services output"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_cpp_services_output.png" />
|
||
<br /><br />
|
||
<ul>
|
||
<li><EFBFBD> <i>bin</i> <20> folder is empty by default, and will contain output client and server
|
||
binaries (shared library <i>*.dll</i> on Windows, <i>*.so</i> on Linux, etc...) ;</li>
|
||
<li><EFBFBD> <i>build</i> <20> folder is empty by default, it can be used to manage <a
|
||
href="https://cmake.org/" target="_blank">CMake configuration files</a> ;</li>
|
||
<li><EFBFBD> <i>client</i> <20> folder contains <a href="http://doc.qt.io/qt-5/qmake-manual.html"
|
||
target="_blank">qmake</a> and <a href="https://cmake.org/" target="_blank">CMake</a>
|
||
files to build project (client layer) ;</li>
|
||
<li><EFBFBD> <i>custom</i> <20> folder is filled if the <20> <a
|
||
href="#cpp_services_export_settings_parameters"><i>Generate custom files</i></a> <20>
|
||
option is enabled ;</li>
|
||
<li><EFBFBD> <i>include</i> <20> folder contains all services definitions for entities and their
|
||
relationships ;</li>
|
||
<li><EFBFBD> <i>server</i> <20> folder contains <a href="http://doc.qt.io/qt-5/qmake-manual.html"
|
||
target="_blank">qmake</a> and <a href="https://cmake.org/" target="_blank">CMake</a>
|
||
files to build project (server layer) ;</li>
|
||
<li><EFBFBD> <i>src</i> <20> folder contains all services implementations for entities and their
|
||
relationships ;</li>
|
||
<li><EFBFBD> <i>CMakeLists.txt</i> <20> file can be used to build services project (client and
|
||
server) with <a href="https://cmake.org/" target="_blank">CMake</a> ;</li>
|
||
<li><EFBFBD> <i>*.gen.pri</i> <20> and <20> <i>*.gen.pro</i> <20> files can be used to build services
|
||
project (client and server) with <a href="http://doc.qt.io/qt-5/qmake-manual.html"
|
||
target="_blank">qmake</a> ;</li>
|
||
<li><EFBFBD> <i>*.gen.json</i> <20> file is used by the server project to build a plugin which can
|
||
be loaded by the <a href="#cpp_services_export_settings_server_app">applications
|
||
server</a> to publish services.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="cpp_services_export_settings_server_app">Generic application server to provide
|
||
services</a></p>
|
||
<div class="manual_div_content">
|
||
If <20> <a href="#cpp_services_export_settings_parameters"><i>Generate server
|
||
application</i></a> <20> option is enabled, then C++ services export process generates
|
||
also a generic applications server.
|
||
This sample applications server is able to publish services loading plugins.
|
||
Like all other C++ projects generated by QxEntityEditor, the generic applications server can
|
||
be built with <a href="http://doc.qt.io/qt-5/qmake-manual.html" target="_blank">qmake</a> and
|
||
<a href="https://cmake.org/" target="_blank">CMake</a>.
|
||
Output directory of the generic applications server project looks like :
|
||
<br /><br />
|
||
<img alt="Export C++ services server app output"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_cpp_services_server_app_output.png" />
|
||
<br /><br />
|
||
Once project is built, an executable is available in the <20> <i>bin</i> <20> directory.
|
||
Open the executable will launch following window :
|
||
<br /><br />
|
||
<img alt="Export C++ services server app"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_cpp_services_server_app.png" />
|
||
<br /><br />
|
||
This screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>Plugins services</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Plugins path</i> <20> : required to define where to find services plugins.
|
||
These plugins are built using <a href="#cpp_services_export_settings_generated">C++
|
||
services server project</a>.
|
||
Once loaded, all plugins publish their services which can be called by clients
|
||
applications.
|
||
If no plugin loaded after selecting the plugins path, then it is possible to define <a
|
||
href="http://doc.qt.io/qt-5/deployment-plugins.html"
|
||
target="_blank"><b>QT_DEBUG_PLUGINS</b> environment variable</a> to log some loading
|
||
errors and help you to understand why plugins are not loaded (generally, a plugin
|
||
dependency not found).</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Database connection parameters</i> :</b>
|
||
<ul>
|
||
<li>This section contains all required parameters to initialize a database connection used
|
||
by services (see <a href="./manual.html#manual_310">qx::QxSqlDatabase</a> class for
|
||
more details).</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Server parameters</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>Port number</i> <20> : define port number opened by the applications server to
|
||
publish services.
|
||
Clients applications have to connect to this port number to send requests to server ;
|
||
</li>
|
||
<li>Field <20> <i>Thread count</i> <20> : number of threads used by server to manage client
|
||
requests ;</li>
|
||
<li>Field <20> <i>Serialization type</i> <20> : serialization type used to send responses from
|
||
server to client ;</li>
|
||
<li>Field <20> <i>Compress data</i> <20> : if enabled, all responses from server to client are
|
||
compressed ;</li>
|
||
<li>Field <20> <i>Encrypt data</i> <20> : if enabled, all responses from server to client are
|
||
encrypted (possibility to define your own encryption key) ;</li>
|
||
<li>Button <20> <i>Start server</i> <20> : button to start and stop server.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Log last client-server reply-request transaction</i> :</b>
|
||
<ul>
|
||
<li>Display in XML or JSON format all details about the last client-server transaction
|
||
managed by the applications server.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Log last server error</i> :</b>
|
||
<ul>
|
||
<li>If an error occurred on applications server, it is automatically logged in this
|
||
section.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="ddl_export_settings">Export SQL DDL
|
||
database schema</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor application is able to generate a database schema (structure) in a DDL SQL
|
||
format.
|
||
QxEntityEditor application support most commonly used databases : SQLite, MySQL, MariaDB,
|
||
PostgreSQL, Oracle and Microsoft SQL Server.
|
||
Generated DDL SQL script can be imported in database to create automatically all tables,
|
||
columns, primary keys, relationships, index, etc...
|
||
DDL SQL parameters are accessible via main menu : <i>Tools >> Export to DDL SQL script
|
||
file (settings)</i> :
|
||
<br /><br />
|
||
<img alt="Export SQL DDL"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_ddl.png" />
|
||
<br /><br />
|
||
This export parameters screen is divided in several sections :
|
||
<br /><br />
|
||
<b>-- Section <i>DDL export settings</i> :</b>
|
||
<ul>
|
||
<li>Field <20> <i>File location</i> <20> : output directory which will contain the generated DDL
|
||
SQL script ;</li>
|
||
<li>Field <20> <i>Database type</i> <20> : select DDL SQL script format (SQLite, MySQL, MariaDB,
|
||
PostgreSQL, Oracle or Microsoft SQL Server) ;</li>
|
||
<li>Field <20> <i>Relationships</i> <20> : if enabled, then foreign keys are created to manage
|
||
relationships between entities ;</li>
|
||
<li>Field <20> <i>Schema</i> <20> : define DDL export type : 1 script which contains all
|
||
<i>*.qxee</i> items, or 1 script <a href="#tag_project_state">per <i>*.qxee</i> project
|
||
version</a> (database schema evolution).
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Mapping C++ type to database SQL type</i> :</b>
|
||
<ul>
|
||
<li>List to map C++ type (defined in all <i>*.qxee</i> project properties) to SQL type.</li>
|
||
</ul>
|
||
<br />
|
||
<b>-- Section <i>Custom script (Javascript file) to change the default behaviour of the export
|
||
process</i> :</b> <a href="#js_engine">settings for export custom engine</a>.
|
||
<ul>
|
||
<li>Field <20> <i>Custom script file</i> <20> : Javascript file location to <a
|
||
href="#js_engine">customize export process</a>.
|
||
If empty, no customization is applied (default behaviour of export process).
|
||
You can define in this field a relative path to <i>*.qxee</i> project file, for example
|
||
<i>./my_script.js</i> if <i>my_script.js</i> file is in the same directory as
|
||
<i>*.qxee</i> file ;
|
||
</li>
|
||
<li>Button <20> <i>Debug custom Javascript file</i> <20> : if a Javascript file is defined, a click
|
||
on this button will enable <a href="#js_engine_debug">Javascript debugging mode</a> for
|
||
the next export process.
|
||
Instead of using this button, you can also enable <a href="#js_engine_debug">Javascript
|
||
debugging mode</a> pressing <i>SHIFT</i> keyboard shortcut when starting an export
|
||
process.</li>
|
||
</ul>
|
||
<br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="printer_settings">Print entities
|
||
diagram</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor application is able to print entities diagram to PNG and/or PDF format.
|
||
Print parameters are accessible via main menu : <i>Tools >> Print the entities diagram
|
||
(settings)</i> :
|
||
<br /><br />
|
||
<img alt="Export print PNG/PDF"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_print.png" />
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2"
|
||
name="source_control_export_settings">Export to a directory linked to a Source Control
|
||
manager (Git, Perforce, CVS, etc.)</a></p>
|
||
<div class="manual_div_content">
|
||
A QxEntityEditor project (<i>*.qxee</i> file) can be managed by a developers team : the source
|
||
code of a QxEntityEditor project can be exported/imported (manually or using command line) with
|
||
<a href="#source_control_export_settings"><b>QxEESourceControlExport</b></a> and <a
|
||
href="#wnd_source_control_import"><b>QxEESourceControlImport</b></a> plugins.<br />
|
||
<br />
|
||
Associated with a Source Control manager (Git, Perforce, CVS, etc.), these 2 plugins provide :
|
||
<ul>
|
||
<li>several people can work simultaneously on the same project ;</li>
|
||
<li>a project can easily be versioned in the source code manager ;</li>
|
||
<li>each element of a project can be compared (difference between 2 versions of the same
|
||
entity for example).</li>
|
||
</ul>
|
||
Here is a use case of <a
|
||
href="#source_control_export_settings"><b>QxEESourceControlExport</b></a> and <a
|
||
href="#wnd_source_control_import"><b>QxEESourceControlImport</b></a> plugins, with 2
|
||
developers named 'dev A' and 'dev B' (this example can be extended to X developers) :
|
||
<ul>
|
||
<li>dev A and dev B work on a same QxEntityEditor project (<i>*.qxee</i> file) ;</li>
|
||
<li>dev A creates/changes/deletes some entities in QxEntityEditor application ;</li>
|
||
<li>dev B creates/changes/deletes other entities in QxEntityEditor application ;</li>
|
||
<li>dev A and dev B export the <i>*.qxee</i> project file with the <a
|
||
href="#source_control_export_settings"><b>QxEESourceControlExport</b></a> plugin
|
||
(manually or using command line) ;</li>
|
||
<li>once the project is exported to a directory, dev A and dev B check-in (or <i>submit</i>)
|
||
all generated JSON files to the Source Control manager (Git, Perforce, CVS, etc.) on their
|
||
own branch ;</li>
|
||
<li>from the Source Control manager, dev A and dev B merge (or <i>integrate</i>) their own
|
||
branch to the development branch DEV (or MAIN or MASTER or LATEST); <b>Note :</b> even if
|
||
there are conflicts to resolve, they will be easy to correct because the JSON format is
|
||
easily readable ;</li>
|
||
<li>dev A and dev B can now get latest files from Source Control manager from DEV branch (or
|
||
MAIN or MASTER or LATEST) : these JSON files <b>contain both modifications from dev A and
|
||
dev B</b> ;</li>
|
||
<li>dev A and dev B can import these JSON files into the QxEntityEditor application using the
|
||
import plugin <a href="#wnd_source_control_import"><b>QxEESourceControlImport</b></a>
|
||
(manually or using command line).</li>
|
||
</ul>
|
||
The export plugin settings are accessible from the main menu <i>Tools >> Export to Source
|
||
Control repository (Git, Perforce, CVS, etc.) as JSON files (settings)</i> :
|
||
<br /><br />
|
||
<img alt="Source Control export plugin settings"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_source_control_settings.png" />
|
||
<br /><br />
|
||
The parameter to enter corresponds to the directory in which the JSON files will be
|
||
generated.<br />
|
||
Each <i>*.qxee</i> project item (entities, properties, relationships, comments, etc.) is
|
||
exported to a specific JSON file.<br />
|
||
The directory where the JSON files are exported has the following structure :
|
||
<br /><br />
|
||
<img alt="Source Control output directory"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_source_control_output_directory.png" />
|
||
<br /><br />
|
||
<b>Note :</b> it is possible to export a project from command line without starting the
|
||
QxEntityEditor application UI.<br />
|
||
Command line example :<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --no_gui --project="<path_to_your_qxee_project_file>" --plugin=QxEESourceControlExport --QxEESourceControlExport_path="<path_to_your_export_output_directory>"</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="xml_export_settings">Export project
|
||
to XML or JSON format</a></p>
|
||
<div class="manual_div_content">
|
||
<b>
|
||
<font style="background-color:yellow">Note :</font>
|
||
</b> to work with a source code manager (Git, Perforce, CVS, etc.), it is recommended to use <a
|
||
href="#source_control_export_settings"><b>QxEESourceControlExport</b></a> and <a
|
||
href="#wnd_source_control_import"><b>QxEESourceControlImport</b></a> plugins (instead of
|
||
creating a single file).<br />
|
||
<br />
|
||
QxEntityEditor application can export a <i>*.qxee</i> project to XML or JSON format.
|
||
XML/JSON export parameters are accessible via main menu : <i>Tools >> Export to XML or
|
||
JSON file (settings)</i> :
|
||
<br /><br />
|
||
<img alt="Export XML/JSON"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_export_xml_json.png" />
|
||
<br /><br />
|
||
<b>Note : </b> a XML file cannot be used to import items in a <i>*.qxee</i> project.
|
||
On the other hand, a JSON file can be used to import items in a <i>*.qxee</i> project using the
|
||
import plugin : <a href="#wnd_json_import">Import project based on JSON file</a>.
|
||
<br /><br />
|
||
</div>
|
||
</div>
|
||
|
||
<p class="manual_p_title_1"><a class="manual_a_title_1" name="js_engine">Javascript engine to
|
||
customize export</a></p>
|
||
<div class="manual_div_content_1">
|
||
QxEntityEditor application provides a powerful export customization engine.
|
||
This engine is based on <a href="https://en.wikipedia.org/wiki/JavaScript"
|
||
target="_blank">Javascript language</a> to write scripts to customize QxEntityEditor exports.
|
||
These <a href="https://en.wikipedia.org/wiki/JavaScript" target="_blank">Javascript</a> scripts can
|
||
access to all parameters and items of a <i>*.qxee</i> project, and a <a
|
||
href="#js_engine_debug">QxEntityEditor native debugger</a> can be enabled to help you to develop
|
||
and fix your scripts.
|
||
It is also possible <a href="#js_engine_functions_files">to write your own files during export
|
||
process</a>.
|
||
<br /><br />
|
||
<b>Note :</b> the <i>./samples/</i> directory of QxEntityEditor package provides 2 documented
|
||
samples scripts : <i>custom_script.js</i> and <a
|
||
href="#js_engine_example_q_property"><i>q_property.js</i></a>.
|
||
<br /><br />
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="js_engine_architecture">Architecture
|
||
and workflow of Javascript engine</a></p>
|
||
<div class="manual_div_content">
|
||
All QxEntityEditor <a href="#export_plugins">export plugins</a> provide following settings : <a
|
||
href="#cpp_export_settings_parameters"><i>Custom script (Javascript file) to change the
|
||
default behaviour of the export process</i></a>.
|
||
This is where you can define a <a href="https://en.wikipedia.org/wiki/JavaScript"
|
||
target="_blank">Javascript</a> file to use to customize your exports.
|
||
Export engine is based on <i>placeholders</i> (<i>@@ACTION@@</i> format) to replace code by
|
||
calculated value.
|
||
<i>Placeholder</i> is the most important part to understand how <a href="#js_engine">Javascript
|
||
customization engine</a> works.
|
||
Please note that you can define <a href="#js_engine_placeholder">your own custom placeholder
|
||
with <i>@@CUSTOM_</i> prefix</a>, for example : <i>@@CUSTOM_MY_ACTION@@</i>.
|
||
During an export process, QxEntityEditor application iterates over all entities and enumerations
|
||
defined in <i>*.qxee</i> project.
|
||
Each time a <i>placeholder</i> is read by export engine (<i>@@ACTION@@</i> format), the <a
|
||
href="https://en.wikipedia.org/wiki/JavaScript" target="_blank">Javascript</a> script is
|
||
called with all input parameters required to customize output files.
|
||
<br /><br />
|
||
Here is a minimal <a href="https://en.wikipedia.org/wiki/JavaScript"
|
||
target="_blank">Javascript</a> file example.
|
||
This script does nothing, it just shows what is a valid QxEntityEditor <a
|
||
href="https://en.wikipedia.org/wiki/JavaScript" target="_blank">Javascript</a> file :
|
||
<ul>
|
||
<li>an entry point function named <i>customProcess()</i> ;</li>
|
||
<li><a href="#js_engine_input_params">an input parameter (call context) named
|
||
<i>params</i></a> ;</li>
|
||
<li><i>customProcess()</i> function must return text to write to output file.</li>
|
||
</ul>
|
||
<br />
|
||
<div style="width:900px; height:360px; overflow:auto; background-color:white">
|
||
<pre><span class="operator">({</span><span class="comment">
|
||
|
||
// Here is the entry point of the QxEntityEditor javascript engine
|
||
// This function is called for each placeholder defined in the C++ template section
|
||
</span>customProcess<span class="operator"> :</span> function<span class="operator">(</span>params<span class="operator">)
|
||
{</span><span class="flow">
|
||
try</span><span class="operator">
|
||
{</span><span class="comment">
|
||
// quit with 'params[0]' means : doesn't change the default export behaviour
|
||
</span><span class="flow"> return</span> params<span class="operator">[</span><span class="int">0</span><span class="operator">];
|
||
}</span><span class="flow">
|
||
catch</span><span class="operator"> (</span>err<span class="operator">)
|
||
{</span><span class="flow"> return</span><span class="operator"> (</span><span class="string">"[CustomScriptError] an unexpected error occurred : "</span><span class="operator"> +</span> err<span class="operator">); }
|
||
}
|
||
|
||
});</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="js_engine_input_params">Input
|
||
parameters of Javascript engine</a></p>
|
||
<div class="manual_div_content">
|
||
<i>customProcess()</i> function input parameter (named <i>params</i>) is an array which
|
||
contain a list of values (this is the call context of the script).
|
||
Here is a sample function which can be used in your own scripts to list and to give meaning
|
||
to all input values :
|
||
<br /><br />
|
||
<div style="width:900px; height:550px; overflow:auto; background-color:white">
|
||
<pre>function printParams<span class="operator">(</span>params<span class="operator">)
|
||
{</span>
|
||
var log<span class="operator"> =</span><span class="string"> ""</span><span class="operator">;</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - default_value = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">0</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - project_name = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">1</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - project_file = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">2</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - plugin_name = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">3</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - current_file = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">4</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - action (or placeholder) = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">5</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_name = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">6</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_table_name = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">7</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_name = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">8</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_type = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">9</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_column_name = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">10</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_is_primary_key = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">11</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_name = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">12</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_id = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">13</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_id = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">14</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_id = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">15</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - output_location = "</span><span class="operator"> +</span> params<span class="operator">[</span><span class="int">16</span><span class="operator">];</span>
|
||
|
||
print<span class="operator">(</span>log<span class="operator">);</span><span class="comment"> // print value to the custom script debugger window
|
||
</span> helper<span class="operator">.</span>print<span class="operator">(</span>log<span class="operator">);</span><span class="comment"> // print value to the standard output (for example, on Windows, use the 'DebugView' application to see all logs)
|
||
</span><span class="flow"> return</span> log<span class="operator">;
|
||
}</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="js_engine_functions">Available
|
||
functions in Javascript</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor export customization engine support all <a
|
||
href="https://en.wikipedia.org/wiki/JavaScript" target="_blank">Javascript</a> language
|
||
features (<i>ECMAScript 5</i>).
|
||
QxEntityEditor application provides also a global instance of object named <i><b>helper</b></i>
|
||
which can be used in your own scripts to access to more features.
|
||
We will list in this chapter the most commonly used features to customize output files.
|
||
<br /><br />
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="js_engine_functions_entity">Get
|
||
entity details</a></p>
|
||
<div class="manual_div_content">
|
||
Here is an example to get all current entity parameters,
|
||
<i><b>helper.getEntityDetails(entity_id)</b></i> :
|
||
<br /><br />
|
||
<div style="width:900px; height:500px; overflow:auto; background-color:white">
|
||
<pre>var entity_id<span class="operator"> =</span> params<span class="operator">[</span><span class="int">13</span><span class="operator">];</span>
|
||
printEntityDetails<span class="operator">(</span>entity_id<span class="operator">);</span><span class="comment">
|
||
|
||
//...
|
||
</span>
|
||
function printEntityDetails<span class="operator">(</span>entity_id<span class="operator">)
|
||
{</span>
|
||
var details<span class="operator"> =</span> helper<span class="operator">.</span>getEntityDetails<span class="operator">(</span>entity_id<span class="operator">);</span><span class="flow">
|
||
if</span><span class="operator"> (</span>details<span class="operator">.</span>length<span class="operator"> ==</span><span class="int"> 0</span><span class="operator">) {</span><span class="flow"> return</span> details<span class="operator">; }</span>
|
||
|
||
var log<span class="operator"> =</span><span class="string"> ""</span><span class="operator">;</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_id = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">0</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_key = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">1</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_name = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">2</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_namespace = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">3</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_tablename = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">4</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_description = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">5</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_is_read_only = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">6</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_is_abstract = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">7</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_version = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">8</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_primary_key_property_id = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">9</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_list_of_properties_id = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">10</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_has_triggers = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">11</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_trigger_on_before_fetch = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">12</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_trigger_on_after_fetch = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">13</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_trigger_on_before_insert = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">14</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_trigger_on_after_insert = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">15</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_trigger_on_before_update = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">16</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_trigger_on_after_update = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">17</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_trigger_on_before_delete = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">18</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_trigger_on_after_delete = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">19</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_parent_id = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">20</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_soft_delete_column = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">21</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - entity_validator_method = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">22</span><span class="operator">];</span>
|
||
|
||
print<span class="operator">(</span>log<span class="operator">);</span><span class="comment"> // print value to the custom script debugger window
|
||
</span> helper<span class="operator">.</span>print<span class="operator">(</span>log<span class="operator">);</span><span class="comment"> // print value to the standard output (for example, on Windows, use the 'DebugView' application to see all logs)
|
||
</span><span class="flow"> return</span> details<span class="operator">;
|
||
}</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3"
|
||
name="js_engine_functions_iterate_property">Iterate over list of properties of an
|
||
entity</a></p>
|
||
<div class="manual_div_content">
|
||
Here is an example to iterate over all properties defined in current entity :
|
||
<br /><br />
|
||
<div style="width:900px; height:230px; overflow:auto; background-color:white">
|
||
<pre>var entity_id<span class="operator"> =</span> params<span class="operator">[</span><span class="int">13</span><span class="operator">];</span>
|
||
var entity_details<span class="operator"> =</span> helper<span class="operator">.</span>getEntityDetails<span class="operator">(</span>entity_id<span class="operator">);</span>
|
||
var entity_list_of_properties_id<span class="operator"> = ((</span>entity_details<span class="operator">.</span>length<span class="operator"> ></span><span class="int"> 0</span><span class="operator">) ?</span> entity_details<span class="operator">[</span><span class="int">10</span><span class="operator">] :</span><span class="string"> ""</span><span class="operator">);</span>
|
||
var entity_list_of_properties_array<span class="operator"> =</span> entity_list_of_properties_id<span class="operator">.</span>split<span class="operator">(</span><span class="string">"|"</span><span class="operator">);</span><span class="flow">
|
||
for</span><span class="operator"> (</span>var idx<span class="operator"> =</span><span class="int"> 0</span><span class="operator">;</span> idx<span class="operator"> <</span> entity_list_of_properties_array<span class="operator">.</span>length<span class="operator">;</span> idx<span class="operator">++)
|
||
{</span>
|
||
var property_id<span class="operator"> =</span> entity_list_of_properties_array<span class="operator">[</span>idx<span class="operator">];</span>
|
||
var property_details<span class="operator"> =</span> helper<span class="operator">.</span>getPropertyDetails<span class="operator">(</span>property_id<span class="operator">);</span><span class="comment">
|
||
// ...
|
||
</span><span class="operator">}</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="js_engine_functions_property">Get
|
||
property details</a></p>
|
||
<div class="manual_div_content">
|
||
Here is an example to get all property parameters,
|
||
<i><b>helper.getPropertyDetails(property_id)</b></i> :
|
||
<br /><br />
|
||
<div style="width:900px; height:500px; overflow:auto; background-color:white">
|
||
<pre>function printPropertyDetails<span class="operator">(</span>property_id<span class="operator">)
|
||
{</span>
|
||
var details<span class="operator"> =</span> helper<span class="operator">.</span>getPropertyDetails<span class="operator">(</span>property_id<span class="operator">);</span><span class="flow">
|
||
if</span><span class="operator"> (</span>details<span class="operator">.</span>length<span class="operator"> ==</span><span class="int"> 0</span><span class="operator">) {</span><span class="flow"> return</span> details<span class="operator">; }</span>
|
||
|
||
var log<span class="operator"> =</span><span class="string"> ""</span><span class="operator">;</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_id = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">0</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_key = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">1</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_name = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">2</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_column_name = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">3</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_description = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">4</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_type = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">5</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_version = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">6</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_entity_id = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">7</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_is_read_only = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">8</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_is_primary_key = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">9</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_is_serializable = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">10</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_is_transient = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">11</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_is_obsolete = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">12</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_is_index = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">13</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_is_unique = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">14</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_allow_null = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">15</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_order_level = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">16</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_default_value = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">17</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_format = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">18</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_force_sql_type = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">19</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_force_sql_alias = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">20</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_min_value = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">21</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_max_value = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">22</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_min_length = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">23</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_max_length = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">24</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_reg_exp = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">25</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_accessibility = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">26</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_is_relationship = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">27</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_relation_type = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">28</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_relation_entity_target_id = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">29</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_relation_inverse_property_id = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">30</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_relation_foreign_key = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">31</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_relation_foreign_key_owner = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">32</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_relation_extra_table = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">33</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - property_relation_type_desc = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">34</span><span class="operator">];</span>
|
||
|
||
print<span class="operator">(</span>log<span class="operator">);</span><span class="comment"> // print value to the custom script debugger window
|
||
</span> helper<span class="operator">.</span>print<span class="operator">(</span>log<span class="operator">);</span><span class="comment"> // print value to the standard output (for example, on Windows, use the 'DebugView' application to see all logs)
|
||
</span><span class="flow"> return</span> details<span class="operator">;
|
||
}</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="js_engine_functions_enum">Get
|
||
enumeration details</a></p>
|
||
<div class="manual_div_content">
|
||
Here is an example to get all current enumeration parameters,
|
||
<i><b>helper.getEnumerationDetails(enumeration_id)</b></i> :
|
||
<br /><br />
|
||
<div style="width:900px; height:500px; overflow:auto; background-color:white">
|
||
<pre>var enumeration_id<span class="operator"> =</span> params<span class="operator">[</span><span class="int">15</span><span class="operator">];</span>
|
||
printEnumerationDetails<span class="operator">(</span>enumeration_id<span class="operator">);</span><span class="comment">
|
||
|
||
//...
|
||
</span>
|
||
function printEnumerationDetails<span class="operator">(</span>enumeration_id<span class="operator">)
|
||
{</span>
|
||
var details<span class="operator"> =</span> helper<span class="operator">.</span>getEnumerationDetails<span class="operator">(</span>enumeration_id<span class="operator">);</span><span class="flow">
|
||
if</span><span class="operator"> (</span>details<span class="operator">.</span>length<span class="operator"> ==</span><span class="int"> 0</span><span class="operator">) {</span><span class="flow"> return</span> details<span class="operator">; }</span>
|
||
|
||
var log<span class="operator"> =</span><span class="string"> ""</span><span class="operator">;</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_id = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">0</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_key = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">1</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_name = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">2</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_namespace = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">3</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_description = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">4</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_version = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">5</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_use_qt_enum_macro = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">6</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_list_of_keys = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">7</span><span class="operator">];</span>
|
||
log<span class="operator"> =</span> log<span class="operator"> +</span><span class="string"> "\n - enumeration_list_of_values = "</span><span class="operator"> +</span> details<span class="operator">[</span><span class="int">8</span><span class="operator">];</span>
|
||
|
||
print<span class="operator">(</span>log<span class="operator">);</span><span class="comment"> // print value to the custom script debugger window
|
||
</span> helper<span class="operator">.</span>print<span class="operator">(</span>log<span class="operator">);</span><span class="comment"> // print value to the standard output (for example, on Windows, use the 'DebugView' application to see all logs)
|
||
</span><span class="flow"> return</span> details<span class="operator">;
|
||
}</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="js_engine_functions_meta_data">Get
|
||
meta-data of entity/property/enumeration</a></p>
|
||
<div class="manual_div_content">
|
||
QxEntityEditor application provides a feature to define some meta-data linked to <a
|
||
href="#entity_params">entity</a>, <a href="#property_params">property</a> or <a
|
||
href="#enumeration_params">enumeration</a>.
|
||
These meta-data can be used for example to define extra-parameters not provided by default by
|
||
QxEntityEditor application.
|
||
These meta-data are available in generated C++ code (<a
|
||
href="./manual.html#manual_70">introspection engine of QxOrm library</a>), and are also
|
||
available in QxEntityEditor Javascript engine.
|
||
Here is an example to get meta-data values in Javascript :
|
||
<br /><br />
|
||
<div style="width:900px; height:250px; overflow:auto; background-color:white">
|
||
<pre>var entity_id<span class="operator"> =</span> params<span class="operator">[</span><span class="int">13</span><span class="operator">];</span>
|
||
var entity_meta_data<span class="operator"> =</span> helper<span class="operator">.</span>getEntityMetaData<span class="operator">(</span>entity_id<span class="operator">,</span><span class="string"> "MY_ENTITY_META_DATA_KEY"</span><span class="operator">);</span><span class="comment">
|
||
|
||
// ...
|
||
</span>
|
||
var property_meta_data<span class="operator"> =</span> helper<span class="operator">.</span>getPropertyMetaData<span class="operator">(</span>property_id<span class="operator">,</span><span class="string"> "MY_PROPERTY_META_DATA_KEY"</span><span class="operator">);</span><span class="comment">
|
||
|
||
// ...
|
||
</span>
|
||
var enumeration_id<span class="operator"> =</span> params<span class="operator">[</span><span class="int">15</span><span class="operator">];</span>
|
||
var enumeration_meta_data<span class="operator"> =</span> helper<span class="operator">.</span>getEnumerationMetaData<span class="operator">(</span>enumeration_id<span class="operator">,</span><span class="string"> "MY_ENUM_META_DATA_KEY"</span><span class="operator">);</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="js_engine_functions_env_var">Get
|
||
environment variable</a></p>
|
||
<div class="manual_div_content">
|
||
Here is an example to get/set environment variables in Javascript,
|
||
<i><b>helper.getEnvironmentVariable()</b></i> and
|
||
<i><b>helper.setEnvironmentVariable()</b></i> :
|
||
<br /><br />
|
||
<div style="width:900px; height:80px; overflow:auto; background-color:white">
|
||
<pre>var env_var<span class="operator"> =</span> helper<span class="operator">.</span>getEnvironmentVariable<span class="operator">(</span><span class="string">"QT_DIR"</span><span class="operator">);</span>
|
||
var set_env_var_ok<span class="operator"> =</span> helper<span class="operator">.</span>setEnvironmentVariable<span class="operator">(</span><span class="string">"MY_ENV_VAR"</span><span class="operator">,</span><span class="string"> "my_value"</span><span class="operator">);</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="js_engine_functions_files">Read
|
||
and write to files</a></p>
|
||
<div class="manual_div_content">
|
||
Javascript engine of QxEntityEditor application is able to read and write to files (whatever
|
||
files on your system, not only exported files).
|
||
Javascript classes <i><b>file</b></i> and <i><b>dir</b></i> are available to instantiate
|
||
Javascript objects and to provide functions to manage files and directories.
|
||
<br /><br />
|
||
The Javascript <i><b>file</b></i> class provides the same definition as <a
|
||
href="http://doc.qt.io/qt-5/qfile.html" target="_blank">QFile Qt class</a> :
|
||
<br /><br />
|
||
<div style="width:900px; height:400px; overflow:auto; background-color:white">
|
||
<pre><span class="comment">/*
|
||
--- 'file' class methods available by script (QFile wrapper : http://doc.qt.io/qt-5/qfile.html) ---
|
||
|
||
bool copy(string fileName, string newName);
|
||
bool exists(string fileName);
|
||
bool link(string fileName, string linkName);
|
||
bool remove(string fileName);
|
||
bool rename(string oldName, string newName);
|
||
string readAll(string fileName);
|
||
|
||
void setFileName(string name);
|
||
string fileName();
|
||
bool open(int mode); // enum QIODevice::OpenMode, for example : 26 = (QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text) = (2 + 8 + 16)
|
||
int error(); // enum QFile::FileError
|
||
void close();
|
||
bool atEnd();
|
||
string readLine();
|
||
void write(string text);
|
||
*/</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
The Javascript <i><b>dir</b></i> class provides the same definition as <a
|
||
href="http://doc.qt.io/qt-5/qdir.html" target="_blank">QDir Qt class</a> :
|
||
<br /><br />
|
||
<div style="width:900px; height:400px; overflow:auto; background-color:white">
|
||
<pre><span class="comment">/*
|
||
--- 'dir' class methods available by script (QDir wrapper : http://doc.qt.io/qt-5/qdir.html) ---
|
||
|
||
void setPath(string path);
|
||
string path();
|
||
string appPath();
|
||
string homePath();
|
||
string rootPath();
|
||
string tempPath();
|
||
|
||
string fromNativeSeparators(string pathName);
|
||
string toNativeSeparators(string pathName);
|
||
|
||
string cleanPath(string path);
|
||
bool isAbsolutePath(string path);
|
||
bool isRelativePath(string path);
|
||
bool match(string filter, string fileName);
|
||
|
||
bool mkdir(string dirName);
|
||
bool mkpath(string dirPath);
|
||
bool rmdir(string dirName);
|
||
bool rmpath(string dirPath);
|
||
bool exists(string name);
|
||
|
||
bool cdUp();
|
||
bool cd(string dirName);
|
||
string absoluteFilePath(string fileName);
|
||
string absolutePath();
|
||
string canonicalPath();
|
||
string dirName();
|
||
string filePath(string fileName);
|
||
void refresh();
|
||
string relativeFilePath(string fileName);
|
||
|
||
bool isAbsolute();
|
||
bool isReadable();
|
||
bool isRelative();
|
||
bool isRoot();
|
||
*/</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
<b>Example :</b> read a file content :
|
||
<br /><br />
|
||
<div style="width:900px; height:80px; overflow:auto; background-color:white">
|
||
<pre>var f1<span class="operator"> =</span><span class="keyword"> new</span> file<span class="operator">();</span>
|
||
var f1_content<span class="operator"> =</span> f1<span class="operator">.</span>readAll<span class="operator">(</span><span class="string">"C:\\Temp\\my_file.txt"</span><span class="operator">);</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
<b>Other example :</b> write to a file :
|
||
<br /><br />
|
||
<div style="width:900px; height:150px; overflow:auto; background-color:white">
|
||
<pre>var f2<span class="operator"> =</span><span class="keyword"> new</span> file<span class="operator">();</span>
|
||
f2<span class="operator">.</span>setFileName<span class="operator">(</span><span class="string">"C:\\Temp\\file_generated_by_script.txt"</span><span class="operator">);</span>
|
||
f2<span class="operator">.</span>open<span class="operator">(</span><span class="int">26</span><span class="operator">);</span><span class="comment"> // (QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text) = (2 + 8 + 16)
|
||
</span>f2<span class="operator">.</span>write<span class="operator">(</span><span class="string">"aaa"</span><span class="operator">);</span>
|
||
f2<span class="operator">.</span>write<span class="operator">(</span><span class="string">"bbb"</span><span class="operator">);</span>
|
||
f2<span class="operator">.</span>close<span class="operator">();</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="js_engine_functions_list">Get list
|
||
of entities/enumerations of a project</a></p>
|
||
<div class="manual_div_content">
|
||
Here is how to get all entities and enumerations of a <i>*.qxee</i> project :
|
||
<br /><br />
|
||
<div style="width:900px; height:100px; overflow:auto; background-color:white">
|
||
<pre>var listOfAllEntities<span class="operator"> =</span> helper<span class="operator">.</span>getListOfAllEntities<span class="operator">();</span><span class="comment"> // 'listOfAllEntities' variable is an array, each item of this array contains : <entity_id>|<entity_name>
|
||
</span>var listOfAllEnums<span class="operator"> =</span> helper<span class="operator">.</span>getListOfAllEnums<span class="operator">();</span><span class="comment"> // 'listOfAllEnums' variable is an array, each item of this array contains : <enum_id>|<enum_name></span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_3"><a class="manual_a_title_3" name="js_engine_qxee_params">Fetch all
|
||
application settings (at global level, project level and plugin level)</a></p>
|
||
<div class="manual_div_content">
|
||
Here is how to fetch all application settings (JSON format) :
|
||
<ul>
|
||
<li><a href="#global_settings">at global level</a> calling function :
|
||
<i>helper.getQxEEGlobalSettingsJson()</i> ;
|
||
</li>
|
||
<li><a href="#project_settings">at project level</a> calling function :
|
||
<i>helper.getQxEEProjectSettingsJson()</i> ;
|
||
</li>
|
||
<li><a href="#cpp_export_settings_parameters">at plugin level</a> calling function :
|
||
<i>helper.getQxEEPluginSetingsJson()</i>.
|
||
</li>
|
||
</ul>
|
||
<br />
|
||
<div style="width:900px; height:300px; overflow:auto; background-color:white">
|
||
<pre>var globalSettings<span class="operator"> =</span> helper<span class="operator">.</span>getQxEEGlobalSettingsJson<span class="operator">();</span><span class="comment"> // the result is a string in JSON format ==> so just use JSON.parse() function to get a javascript object instance
|
||
</span>var projectSettings<span class="operator"> =</span> helper<span class="operator">.</span>getQxEEProjectSettingsJson<span class="operator">();</span><span class="comment"> // the result is a string in JSON format ==> so just use JSON.parse() function to get a javascript object instance
|
||
</span>var pluginSettings<span class="operator"> =</span> helper<span class="operator">.</span>getQxEEPluginSetingsJson<span class="operator">();</span><span class="comment"> // the result is a string in JSON format ==> so just use JSON.parse() function to get a javascript object instance
|
||
</span>
|
||
print<span class="operator">(</span>globalSettings<span class="operator">);</span> helper<span class="operator">.</span>print<span class="operator">(</span>globalSettings<span class="operator">);</span>
|
||
print<span class="operator">(</span>projectSettings<span class="operator">);</span> helper<span class="operator">.</span>print<span class="operator">(</span>projectSettings<span class="operator">);</span>
|
||
print<span class="operator">(</span>pluginSettings<span class="operator">);</span> helper<span class="operator">.</span>print<span class="operator">(</span>pluginSettings<span class="operator">);</span>
|
||
|
||
globalSettings<span class="operator"> =</span> JSON<span class="operator">.</span>parse<span class="operator">(</span>globalSettings<span class="operator">);</span><span class="comment"> // Now 'globalSettings' is a javascript object instance
|
||
</span>projectSettings<span class="operator"> =</span> JSON<span class="operator">.</span>parse<span class="operator">(</span>projectSettings<span class="operator">);</span><span class="comment"> // Now 'projectSettings' is a javascript object instance
|
||
</span>pluginSettings<span class="operator"> =</span> JSON<span class="operator">.</span>parse<span class="operator">(</span>pluginSettings<span class="operator">);</span><span class="comment"> // Now 'pluginSettings' is a javascript object instance</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="js_engine_placeholder">Add a custom
|
||
action (placeholder) in C++ export template</a></p>
|
||
<div class="manual_div_content">
|
||
<a href="#export_plugins">C++ export plugins</a> provide a setting to define template files to
|
||
use during export : <i>Header</i> <i>*.h</i> and <i>Source</i> <i>*.cpp</i>.
|
||
QxEntityEditor application provides several C++ templates by default, and it is possible to
|
||
define your own C++ template (<a href="#cpp_export_settings_parameters">option <20> <i>Custom</i>
|
||
<20></a>).
|
||
<i>Header</i> <i>*.h</i> and <i>Source</i> <i>*.cpp</i> C++ templates contain some
|
||
<i>placeholders</i> (<i>@@ACTION@@</i> format) to replace code by calculated value.
|
||
<i>Placeholder</i> is the most important part to understand how <a href="#js_engine">Javascript
|
||
customization engine</a> works.
|
||
Please note that you can define <a href="#js_engine_placeholder">your own custom placeholder
|
||
with <i>@@CUSTOM_</i> prefix</a>, for example : <i>@@CUSTOM_MY_ACTION@@</i>.
|
||
<br /><br />
|
||
Here is an example to test current action code (so current placeholder inside call context) with
|
||
the Javascript engine :
|
||
<br /><br />
|
||
<div style="width:900px; height:200px; overflow:auto; background-color:white">
|
||
<span class="comment">/* you can define your own placeholder in the template, it must start
|
||
with @@CUSTOM_, for example : @@CUSTOM_MY_ACTION@@
|
||
==> then, in the custom script, check if you are processing your custom action with this
|
||
code : */</span>
|
||
<pre>var action<span class="operator"> =</span> params<span class="operator">[</span><span class="int">5</span><span class="operator">];</span><span class="flow">
|
||
if</span><span class="operator"> (</span>action<span class="operator"> ==</span><span class="string"> "CUSTOM_MY_ACTION"</span><span class="operator">)
|
||
{</span><span class="flow">
|
||
return</span><span class="string"> "quit with my custom code here"</span><span class="operator">;
|
||
}</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="js_engine_example_q_property">Script
|
||
example : add automatically Q_PROPERTY definition on all generated C++ properties</a></p>
|
||
<div class="manual_div_content">
|
||
Here is a documented script (deployed with QxEntityEditor package in
|
||
<i>./samples/q_property.js</i> file) to add automatically <a
|
||
href="http://doc.qt.io/qt-5/properties.html" target="_blank">Q_PROPERTY</a> macro definition
|
||
to all properties of a <i>*.qxee</i> project :
|
||
<br /><br />
|
||
<div style="width:900px; height:600px; overflow:auto; background-color:white">
|
||
<pre><span class="operator">({</span><span class="comment">
|
||
|
||
/* ----------------------------------------------------------------------------------------
|
||
----------------------------------------------------------------------------------------
|
||
'q_property.js' : custom javascript file to customize QxEntityEditor C++ export process.
|
||
This script is an example to show how to use QxEntityEditor javascript engine to add a Q_PROPERTY definition for each property generated by QxEntityEditor.
|
||
More details about Q_PROPERTY macro on Qt web site : http://doc.qt.io/qt-5/properties.html
|
||
|
||
To use this javascript file :
|
||
1- go to the main menu of QxEntityEditor 'Tools >> Export to C++ project (settings)' ;
|
||
2- select the C++ template 'qx::IxPersistable + QObject' : now generated entities will inherit from QObject, which is required to use the Qt Q_PROPERTY macro ;
|
||
3- in the field 'Custom script file' : put the location of this 'q_property.js' custom javascript file ;
|
||
4- save the settings and start the C++ export process ;
|
||
5- check generated files : Q_PROPERTY should be added automatically by the export process.
|
||
----------------------------------------------------------------------------------------
|
||
---------------------------------------------------------------------------------------- */</span><span class="comment">
|
||
|
||
// Here is the entry point of the QxEntityEditor javascript engine
|
||
// This function is called for each placeholder defined in the C++ template section
|
||
</span>customProcess<span class="operator"> :</span> function<span class="operator">(</span>params<span class="operator">)
|
||
{</span><span class="flow">
|
||
try</span><span class="operator">
|
||
{</span><span class="comment">
|
||
// We use here the @@MACRO_QX_PERSISTABLE_HPP@@ placeholder which is present in the default C++ template 'qx::IxPersistable + QObject'
|
||
// You could also create your own custom C++ template (based on 'qx::IxPersistable + QObject' template), and create your own placeholder (which must be prefixed by @@CUSTOM_), for example : @@CUSTOM_Q_PROPERTY@@
|
||
</span> var action<span class="operator"> =</span> params<span class="operator">[</span><span class="int">5</span><span class="operator">];</span><span class="flow">
|
||
if</span><span class="operator"> (</span>action<span class="operator"> !=</span><span class="string"> "MACRO_QX_PERSISTABLE_HPP"</span><span class="operator">) {</span><span class="flow"> return</span> params<span class="operator">[</span><span class="int">0</span><span class="operator">]; }</span><span class="comment"> // quit with 'params[0]' means : doesn't change the default export behaviour
|
||
|
||
// Check if we have an entity
|
||
</span> var entity_id<span class="operator"> =</span> params<span class="operator">[</span><span class="int">13</span><span class="operator">];</span><span class="flow">
|
||
if</span><span class="operator"> ((</span>entity_id<span class="operator"> ==</span><span class="string"> ""</span><span class="operator">) || (</span>entity_id<span class="operator"> ==</span><span class="string"> "0"</span><span class="operator">)) {</span><span class="flow"> return</span> params<span class="operator">[</span><span class="int">0</span><span class="operator">]; }</span><span class="comment"> // quit with 'params[0]' means : doesn't change the default export behaviour
|
||
|
||
// Get the list of properties
|
||
</span> var entity_details<span class="operator"> =</span> helper<span class="operator">.</span>getEntityDetails<span class="operator">(</span>entity_id<span class="operator">);</span>
|
||
var entity_list_of_properties_id<span class="operator"> = ((</span>entity_details<span class="operator">.</span>length<span class="operator"> ></span><span class="int"> 0</span><span class="operator">) ?</span> entity_details<span class="operator">[</span><span class="int">10</span><span class="operator">] :</span><span class="string"> ""</span><span class="operator">);</span>
|
||
var entity_list_of_properties_array<span class="operator"> =</span> entity_list_of_properties_id<span class="operator">.</span>split<span class="operator">(</span><span class="string">"|"</span><span class="operator">);</span><span class="flow">
|
||
if</span><span class="operator"> (</span>entity_list_of_properties_array<span class="operator">.</span>length<span class="operator"> <=</span><span class="int"> 0</span><span class="operator">) {</span><span class="flow"> return</span> params<span class="operator">[</span><span class="int">0</span><span class="operator">]; }</span><span class="comment"> // quit with 'params[0]' means : doesn't change the default export behaviour
|
||
|
||
// Prepare output string
|
||
</span> var output<span class="operator"> =</span> params<span class="operator">[</span><span class="int">0</span><span class="operator">] +</span><span class="string"> "\n"</span><span class="operator">;</span><span class="comment">
|
||
|
||
// Iterate over each property
|
||
</span><span class="flow"> for</span><span class="operator"> (</span>var idx<span class="operator"> =</span><span class="int"> 0</span><span class="operator">;</span> idx<span class="operator"> <</span> entity_list_of_properties_array<span class="operator">.</span>length<span class="operator">;</span> idx<span class="operator">++)
|
||
{</span><span class="comment">
|
||
// Get property details
|
||
</span> var property_id<span class="operator"> =</span> entity_list_of_properties_array<span class="operator">[</span>idx<span class="operator">];</span>
|
||
var property_details<span class="operator"> =</span> helper<span class="operator">.</span>getPropertyDetails<span class="operator">(</span>property_id<span class="operator">);</span><span class="comment">
|
||
|
||
// Here you could also get property meta-data that you can define in QxEntityEditor, property parameters screen, section 'List of meta-data'
|
||
// This is a way to manage your own property parameters which are not a part of QxEntityEditor
|
||
// It could be useful for example to manage some Q_PROPERTY settings like : RESET, NOTIFY, REVISION, DESIGNABLE, SCRIPTABLE, FINAL, etc...
|
||
// To get a property meta-data value, just write this code : var my_meta_data = helper.getPropertyMetaData(property_id, "MY_META_DATA_KEY");
|
||
|
||
// Get property type and name
|
||
</span> var property_type<span class="operator"> =</span> property_details<span class="operator">[</span><span class="int">5</span><span class="operator">];</span>
|
||
var property_name<span class="operator"> =</span> property_details<span class="operator">[</span><span class="int">2</span><span class="operator">];</span><span class="comment">
|
||
|
||
// Check if property type can be used with Q_PROPERTY macro
|
||
</span><span class="flow"> if</span><span class="operator"> (</span>list_of_compatible_property_type<span class="operator">.</span>indexOf<span class="operator">(</span>property_type<span class="operator">) == -</span><span class="int">1</span><span class="operator">) {</span><span class="flow"> continue</span><span class="operator">; }</span><span class="comment">
|
||
|
||
// Create Q_PROPERTY definition
|
||
</span> output<span class="operator"> +=</span><span class="string"> "\n Q_PROPERTY("</span><span class="operator"> +</span> property_type<span class="operator"> +</span><span class="string"> " "</span><span class="operator"> +</span> property_name<span class="operator"> +</span><span class="string"> " READ get"</span><span class="operator"> +</span> property_name<span class="operator"> +</span><span class="string"> " WRITE set"</span><span class="operator"> +</span> property_name<span class="operator"> +</span><span class="string"> ")"</span><span class="operator">;
|
||
}</span><span class="flow">
|
||
|
||
return</span> output<span class="operator">;
|
||
}</span><span class="flow">
|
||
catch</span><span class="operator"> (</span>err<span class="operator">)
|
||
{</span><span class="flow"> return</span><span class="operator"> (</span><span class="string">"[CustomScriptError] an unexpected error occurred : "</span><span class="operator"> +</span> err<span class="operator">); }
|
||
}
|
||
|
||
});</span><span class="comment">
|
||
|
||
// Here is a list of C++ types compatible with Qt Q_PROPERTY macro (C++ type can be converted to/from QVariant)
|
||
// You can of course register your own C++ types to be able to use them with Q_PROPERTY macro (using Qt Q_DECLARE_METATYPE() macro)
|
||
// So the following array is not fixed : you can add all C++ types you want...
|
||
</span>var list_of_compatible_property_type<span class="operator"> = [</span><span class="string"> "QBitArray"</span><span class="operator">,</span><span class="string"> "QBitmap"</span><span class="operator">,</span><span class="string"> "bool"</span><span class="operator">,</span><span class="string"> "QBrush"</span><span class="operator">,</span><span class="string"> "QByteArray"</span><span class="operator">,</span><span class="string"> "QChar"</span><span class="operator">,</span><span class="string"> "QColor"</span><span class="operator">,</span><span class="string"> "QDate"</span><span class="operator">,</span><span class="string"> "QDateTime"</span><span class="operator">,</span><span class="string"> "double"</span><span class="operator">,</span><span class="string">
|
||
"QUuid"</span><span class="operator">,</span><span class="string"> "QFont"</span><span class="operator">,</span><span class="string"> "QVariantHash"</span><span class="operator">,</span><span class="string"> "QIcon"</span><span class="operator">,</span><span class="string"> "QImage"</span><span class="operator">,</span><span class="string"> "int"</span><span class="operator">,</span><span class="string"> "QLine"</span><span class="operator">,</span><span class="string"> "QLineF"</span><span class="operator">,</span><span class="string"> "QVariantList"</span><span class="operator">,</span><span class="string"> "qlonglong"</span><span class="operator">,</span><span class="string">
|
||
"QVariantMap"</span><span class="operator">,</span><span class="string"> "QMatrix"</span><span class="operator">,</span><span class="string"> "QMatrix4x4"</span><span class="operator">,</span><span class="string"> "QPixmap"</span><span class="operator">,</span><span class="string"> "QPoint"</span><span class="operator">,</span><span class="string"> "QPointF"</span><span class="operator">,</span><span class="string"> "QPolygon"</span><span class="operator">,</span><span class="string"> "QPolygonF"</span><span class="operator">,</span><span class="string"> "QRect"</span><span class="operator">,</span><span class="string"> "QRectF"</span><span class="operator">,</span><span class="string">
|
||
"QRegExp"</span><span class="operator">,</span><span class="string"> "QRegion"</span><span class="operator">,</span><span class="string"> "QSize"</span><span class="operator">,</span><span class="string"> "QSizeF"</span><span class="operator">,</span><span class="string"> "QString"</span><span class="operator">,</span><span class="string"> "QStringList"</span><span class="operator">,</span><span class="string"> "QTime"</span><span class="operator">,</span><span class="string"> "uint"</span><span class="operator">,</span><span class="string"> "qulonglong"</span><span class="operator">,</span><span class="string"> "QUrl"</span><span class="operator">,</span><span class="string">
|
||
"QVector2D"</span><span class="operator">,</span><span class="string"> "QVector3D"</span><span class="operator">,</span><span class="string"> "QVector4D"</span><span class="operator"> ];</span></pre>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
<p class="manual_p_title_2"><a class="manual_a_title_2" name="js_engine_debug">Enable Javascript
|
||
debugger editor</a></p>
|
||
<div class="manual_div_content">
|
||
Javascript engine of QxEntityEditor application provides a native Javascript debugger.
|
||
This debug environment provides all required features to help you to develop and fix your custom
|
||
scripts :
|
||
<ul>
|
||
<li>define breakpoints ;</li>
|
||
<li>step-by-step mode to go from a code line to another code line during export execution ;
|
||
</li>
|
||
<li>display all variables and their values during export execution ;</li>
|
||
<li>display logs window.</li>
|
||
</ul>
|
||
<br />
|
||
By default, QxEntityEditor Javascript debugger is disabled during an export.
|
||
To enable it and show the debug editor, you can :
|
||
<ul>
|
||
<li>go to <a href="#cpp_export_settings_parameters">export settings</a>, define a script to
|
||
use, then click on <20> <i>Debug custom Javascript file</i> <20> button ;</li>
|
||
<li>or press the <i>SHIFT</i> keyboard shortcut before starting an export process.</li>
|
||
</ul>
|
||
<br />
|
||
<img alt="JS debug" src="https://www.qxorm.com/qxentityeditor/resource/qxee_js_debug.png" />
|
||
<br /><br />
|
||
</div>
|
||
</div>
|
||
|
||
<p class="manual_p_title_1"><a class="manual_a_title_1" name="plugin_script">Execute custom scripts
|
||
(shell/bat) before/after plugin execution</a></p>
|
||
<div class="manual_div_content_1">
|
||
QxEntityEditor application provides a way to define some custom scripts <i>*.bat</i> (Windows),
|
||
<i>*.sh</i> (Linux) or even executables to run before and/or after a QxEntityEditor plugin
|
||
execution.
|
||
Each script (or process) is called with 1 input parameter : the current <i>*.qxee</i> project
|
||
location.
|
||
This feature can be used for example to :
|
||
<ul>
|
||
<li>put generated files to a source control (Git, Perforce, CVS, etc...) ;</li>
|
||
<li>run compilation process for a generated C++ project ;</li>
|
||
<li>execute unitary tests or start an automation server like Jenkins for example ;</li>
|
||
<li>modify some values in the <a href="#qxee_database"><i>*.qxee</i> SQLite database project
|
||
file</a> after importing from a database structure.</li>
|
||
</ul>
|
||
<br />
|
||
To define these scripts or executables to run before and/or after a QxEntityEditor plugin
|
||
execution, just go to the main menu : <i>Tools >> Plugins scripts</i>.
|
||
<br /><br />
|
||
<img alt="Plugin scripts"
|
||
src="https://www.qxorm.com/qxentityeditor/resource/qxee_plugin_scripts.png" />
|
||
<br /><br />
|
||
<b>Note :</b> you can put in this list an absolute path to your script, or a relative path to
|
||
<i>*.qxee</i> project file.
|
||
For example, <i>./my_script.sh</i> means that <i>my_script.sh</i> file must be located in the same
|
||
directory as <i>*.qxee</i> project file.
|
||
<br /><br />
|
||
</div>
|
||
|
||
<p class="manual_p_title_1"><a class="manual_a_title_1" name="qxee_command_line">QxEntityEditor
|
||
command-line interface</a></p>
|
||
<div class="manual_div_content_1">
|
||
QxEntityEditor provides a command-line interface to run the application with some parameters.
|
||
We will detail in this chapter some QxEntityEditor calling examples :
|
||
<br /><br /><br />
|
||
<b>-- Example n<>1 :</b> run QxEntityEditor defining a <i>*.qxee</i> project to load at startup
|
||
(<i>--project</i> parameter) :
|
||
<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --project="c:\test\qxBlog.qxee"</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
<b>-- Example n<>2 :</b> run QxEntityEditor without displaying the user interface (<i>--no_gui</i>
|
||
parameter), defining a <i>*.qxee</i> project to load (<i>--project</i> parameter) and executing
|
||
automatically a C++ export process (<i>--plugin</i> parameter) :
|
||
<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --no_gui --project="c:\test\qxBlog.qxee" --plugin=QxEECppExport</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
<b>-- Example n<>3 :</b> run QxEntityEditor in read-only mode (<i>--viewer_mode</i> parameter), this
|
||
parameter can be used to open large <i>*.qxee</i> projects without any registered license key :
|
||
<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --viewer_mode</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
<b>-- Example n<>4 :</b> run QxEntityEditor tracing all SQL logs (<i>--log_sql</i> parameter), this
|
||
parameter logs all SQL queries executed to <a href="#qxee_database"><i>*.qxee</i> SQLite
|
||
database</a> :
|
||
<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --log_sql</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
<b>-- Example n<>5 :</b> run QxEntityEditor loading a <i>*.qxee</i> project from a JSON file :
|
||
<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --project="<path_to_your_qxee_project_file>" --plugin=QxEEJsonImport --QxEEJsonImport_file="<path_to_your_json_file>"</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
<b>-- Example n<>6 :</b> display documentation about all QxEntityEditor command line parameters :
|
||
<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --?</pre>
|
||
</i>
|
||
</div>
|
||
<br />
|
||
<b>Note :</b> <i>--?</i>, <i>--help</i> or <i>--h</i> will log following output to console :
|
||
<br />
|
||
<div style="width:900px; height:600px; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>*** QxEntityEditor 1.2.5 application global command line parameters ***
|
||
|
||
--project="<full path to *.qxee project file>" : run QxEntityEditor defining a *.qxee project to load at startup
|
||
--no_gui : run QxEntityEditor without displaying the user interface
|
||
--viewer_mode : run QxEntityEditor in read-only mode, this parameter can be used to open large *.qxee projects without any registered license key
|
||
--log_sql : run QxEntityEditor tracing all SQL logs, this parameter logs all SQL queries executed to *.qxee SQLite database
|
||
--font : define application font (due to issues since macOS Catalina 10.15) with syntax <family>||<pointSize>||<weight>||<italic> (only <family> is required), for example : Courier New||14
|
||
--style_sheet : define application style sheet (more details here : https://doc.qt.io/qt-5/stylesheet-reference.html), for example : QWidget { background-color: black }
|
||
--plugin=<plugin name> : run QxEntityEditor and execute automatically a plugin process (see below for specific parameters per plugin)
|
||
|
||
*** Import plugin QxEEJsonImport ***
|
||
|
||
--QxEEJsonImport_file="<full path to your json file>" : [Required] run QxEntityEditor loading a *.qxee project from a JSON file
|
||
|
||
*** Import plugin QxEEMySQLImport ***
|
||
|
||
--QxEEMySQLImport_db_ip="<DB IP>" : [Required] Database server address (IP)
|
||
--QxEEMySQLImport_db_port="<DB port>" : [Required] Port number to connect to database
|
||
--QxEEMySQLImport_db_name="<DB name>" : [Required] Database name
|
||
--QxEEMySQLImport_filter_regexp="<Regular Expression>" : [Optional] Filter to select tables from database to import
|
||
--QxEEMySQLImport_login="<DB Login>" : [Optional] Login to connect to database
|
||
--QxEEMySQLImport_pwd="<DB Password>" : [Optional] Password to connect to database
|
||
--QxEEMySQLImport_namespace="<Namespace>" : [Optional] C++ namespace where imported classes will be located
|
||
--QxEEMySQLImport_delete_namespace=0/1 : [Optional] Delete all entities in the namespace before importing
|
||
--QxEEMySQLImport_import_comment=0/1 : [Optional] Import tables/columns comment to entities/properties description
|
||
--QxEEMySQLImport_import_default_value=0/1 : [Optional] Import columns default value
|
||
--QxEEMySQLImport_boost_optional=0/1 : [Optional] Add boost::optional<T> decoration if a column definition allows NULL value
|
||
--QxEEMySQLImport_organize_diagram=0/1 : [Optional] Organize diagram layout after import process
|
||
--QxEEMySQLImport_relation_decoration=<numeric value> : [Optional] Decoration used for relationships (0=no decoration, 1=boost::shared_ptr, 2=QSharedPointer, 5=std::shared_ptr)
|
||
--QxEEMySQLImport_relation_collection=<numeric value> : [Optional] Collection used for relationships (1=qx::QxCollection, 2=std::vector, 3=std::list, 8=QHash, 10=QList)
|
||
--QxEEMySQLImport_mapping_sql_to_cpp="sql1~cpp1;sql2~cpp2;etc..." : [Optional] List of mappings from SQL type to C++ type
|
||
--QxEEMySQLImport_verbose=0/1 : [Optional] Display more details during the import process
|
||
|
||
*** Import plugin QxEEOdbcImport ***
|
||
|
||
--QxEEOdbcImport_dsn="<ODBC DSN>" : [Required] ODBC DSN to connect to database
|
||
--QxEEOdbcImport_db_type=<numeric value> : [Required] Database engine type (0=generic, 1=postgresql, 2=mysql, 3=oracle, 4=mssqlserver, 5=sqlite)
|
||
--QxEEOdbcImport_filter_regexp="<Regular Expression>" : [Optional] Filter to select tables from database to import
|
||
--QxEEOdbcImport_login="<DB Login>" : [Optional] Login to connect to database
|
||
--QxEEOdbcImport_pwd="<DB Password>" : [Optional] Password to connect to database
|
||
--QxEEOdbcImport_namespace="<Namespace>" : [Optional] C++ namespace where imported classes will be located
|
||
--QxEEOdbcImport_delete_namespace=0/1 : [Optional] Delete all entities in the namespace before importing
|
||
--QxEEOdbcImport_import_comment=0/1 : [Optional] Import tables/columns comment to entities/properties description
|
||
--QxEEOdbcImport_import_default_value=0/1 : [Optional] Import columns default value
|
||
--QxEEOdbcImport_boost_optional=0/1 : [Optional] Add boost::optional<T> decoration if a column definition allows NULL value
|
||
--QxEEOdbcImport_organize_diagram=0/1 : [Optional] Organize diagram layout after import process
|
||
--QxEEOdbcImport_relation_decoration=<numeric value> : [Optional] Decoration used for relationships (0=no decoration, 1=boost::shared_ptr, 2=QSharedPointer, 5=std::shared_ptr)
|
||
--QxEEOdbcImport_relation_collection=<numeric value> : [Optional] Collection used for relationships (1=qx::QxCollection, 2=std::vector, 3=std::list, 8=QHash, 10=QList)
|
||
--QxEEOdbcImport_mapping_sql_to_cpp="sql1~cpp1;sql2~cpp2;etc..." : [Optional] List of mappings from SQL type to C++ type
|
||
--QxEEOdbcImport_verbose=0/1 : [Optional] Display more details during the import process
|
||
|
||
*** Import plugin QxEEPostgreSQLImport ***
|
||
|
||
--QxEEPostgreSQLImport_db_ip="<DB IP>" : [Required] Database server address (IP)
|
||
--QxEEPostgreSQLImport_db_port="<DB port>" : [Required] Port number to connect to database
|
||
--QxEEPostgreSQLImport_db_name="<DB name>" : [Required] Database name
|
||
--QxEEPostgreSQLImport_filter_regexp="<Regular Expression>" : [Optional] Filter to select tables from database to import
|
||
--QxEEPostgreSQLImport_login="<DB Login>" : [Optional] Login to connect to database
|
||
--QxEEPostgreSQLImport_pwd="<DB Password>" : [Optional] Password to connect to database
|
||
--QxEEPostgreSQLImport_namespace="<Namespace>" : [Optional] C++ namespace where imported classes will be located
|
||
--QxEEPostgreSQLImport_delete_namespace=0/1 : [Optional] Delete all entities in the namespace before importing
|
||
--QxEEPostgreSQLImport_import_comment=0/1 : [Optional] Import tables/columns comment to entities/properties description
|
||
--QxEEPostgreSQLImport_import_default_value=0/1 : [Optional] Import columns default value
|
||
--QxEEPostgreSQLImport_boost_optional=0/1 : [Optional] Add boost::optional<T> decoration if a column definition allows NULL value
|
||
--QxEEPostgreSQLImport_organize_diagram=0/1 : [Optional] Organize diagram layout after import process
|
||
--QxEEPostgreSQLImport_relation_decoration=<numeric value> : [Optional] Decoration used for relationships (0=no decoration, 1=boost::shared_ptr, 2=QSharedPointer, 5=std::shared_ptr)
|
||
--QxEEPostgreSQLImport_relation_collection=<numeric value> : [Optional] Collection used for relationships (1=qx::QxCollection, 2=std::vector, 3=std::list, 8=QHash, 10=QList)
|
||
--QxEEPostgreSQLImport_mapping_sql_to_cpp="sql1~cpp1;sql2~cpp2;etc..." : [Optional] List of mappings from SQL type to C++ type
|
||
--QxEEPostgreSQLImport_verbose=0/1 : [Optional] Display more details during the import process
|
||
|
||
*** Import plugin QxEESQLiteImport ***
|
||
|
||
--QxEESQLiteImport_db_path="<DB File Path>" : [Required] SQLite database file path
|
||
--QxEESQLiteImport_filter_regexp="<Regular Expression>" : [Optional] Filter to select tables from database to import
|
||
--QxEESQLiteImport_namespace="<Namespace>" : [Optional] C++ namespace where imported classes will be located
|
||
--QxEESQLiteImport_delete_namespace=0/1 : [Optional] Delete all entities in the namespace before importing
|
||
--QxEESQLiteImport_import_comment=0/1 : [Optional] Import tables/columns comment to entities/properties description
|
||
--QxEESQLiteImport_import_default_value=0/1 : [Optional] Import columns default value
|
||
--QxEESQLiteImport_boost_optional=0/1 : [Optional] Add boost::optional<T> decoration if a column definition allows NULL value
|
||
--QxEESQLiteImport_organize_diagram=0/1 : [Optional] Organize diagram layout after import process
|
||
--QxEESQLiteImport_relation_decoration=<numeric value> : [Optional] Decoration used for relationships (0=no decoration, 1=boost::shared_ptr, 2=QSharedPointer, 5=std::shared_ptr)
|
||
--QxEESQLiteImport_relation_collection=<numeric value> : [Optional] Collection used for relationships (1=qx::QxCollection, 2=std::vector, 3=std::list, 8=QHash, 10=QList)
|
||
--QxEESQLiteImport_mapping_sql_to_cpp="sql1~cpp1;sql2~cpp2;etc..." : [Optional] List of mappings from SQL type to C++ type
|
||
--QxEESQLiteImport_verbose=0/1 : [Optional] Display more details during the import process
|
||
|
||
*** Export plugin QxEECppExport ***
|
||
|
||
!!! Note : this plugin loads automatically previous parameters values before starting the export process, but you can use following parameters to override them !!!
|
||
--QxEECppExport_path="<Export Path>" : [Optional] C++ export path parameter
|
||
--QxEECppExport_template_type=<numeric value> : [Optional] C++ template type selected to build C++ files (0=no_inheritance, 1=ix_persistable, 2=qx_persistable, 3=ix_persistable_and_q_object, 4=custom)
|
||
--QxEECppExport_template_header="<Template Header>" : [Optional] Custom C++ template header file path (QxEECppExport_template_type parameter must be equal to 4, which means custom)
|
||
--QxEECppExport_template_source="<Template Source>" : [Optional] Custom C++ template source file path (QxEECppExport_template_type parameter must be equal to 4, which means custom)
|
||
--QxEECppExport_qxorm_relative_path=0/1 : [Optional] Relative path to QxOrm library
|
||
--QxEECppExport_generate_custom_files=0/1 : [Optional] Generate a custom directory with custom files for each entity
|
||
--QxEECppExport_custom_javacript="<Custom JS>" : [Optional] Custom script (javascript file) to change the default behaviour of the export process
|
||
|
||
*** Export plugin QxEECppModelViewExport ***
|
||
|
||
!!! Note : this plugin loads automatically previous parameters values before starting the export process, but you can use following parameters to override them !!!
|
||
--QxEECppModelViewExport_path="<Export Path>" : [Optional] C++ model/view export path parameter
|
||
--QxEECppModelViewExport_namespace="<Namespace>" : [Optional] Namespace where to put all model/view classes
|
||
--QxEECppModelViewExport_template_type=<numeric value> : [Optional] C++ model/view template type selected to build C++ files (0=default, 1=custom, 2=qx_model_service)
|
||
--QxEECppModelViewExport_template_header="<Template Header>" : [Optional] Custom C++ template header file path (QxEECppModelViewExport_template_type parameter must be equal to 1, which means custom)
|
||
--QxEECppModelViewExport_template_source="<Template Source>" : [Optional] Custom C++ template source file path (QxEECppModelViewExport_template_type parameter must be equal to 1, which means custom)
|
||
--QxEECppModelViewExport_generate_custom_files=0/1 : [Optional] Generate a custom directory with custom files for each entity
|
||
--QxEECppModelViewExport_custom_javacript="<Custom JS>" : [Optional] Custom script (javascript file) to change the default behaviour of the export process
|
||
|
||
*** Export plugin QxEECppServicesExport ***
|
||
|
||
!!! Note : this plugin loads automatically previous parameters values before starting the export process, but you can use following parameters to override them !!!
|
||
--QxEECppServicesExport_path="<Export Path>" : [Optional] C++ services export path parameter
|
||
--QxEECppServicesExport_namespace="<Namespace>" : [Optional] Namespace where to put all services classes
|
||
--QxEECppServicesExport_template_type=<numeric value> : [Optional] C++ services template type selected to build C++ files (0=default, 1=custom)
|
||
--QxEECppServicesExport_template_header="<Template Header>" : [Optional] Custom C++ template header file path (QxEECppServicesExport_template_type parameter must be equal to 1, which means custom)
|
||
--QxEECppServicesExport_template_source="<Template Source>" : [Optional] Custom C++ template source file path (QxEECppServicesExport_template_type parameter must be equal to 1, which means custom)
|
||
--QxEECppServicesExport_generate_custom_files=0/1 : [Optional] Generate a custom directory with custom files for each entity
|
||
--QxEECppServicesExport_custom_javacript="<Custom JS>" : [Optional] Custom script (javascript file) to change the default behaviour of the export process
|
||
--QxEECppServicesExport_generate_server_app=0/1 : [Optional] Generate a sample server application
|
||
--QxEECppServicesExport_server_app_path="<Server App Path>" : [Optional] Server application location
|
||
|
||
*** Export plugin QxEEGenericDDLExport ***
|
||
|
||
!!! Note : this plugin loads automatically previous parameters values before starting the export process, but you can use following parameters to override them !!!
|
||
--QxEEGenericDDLExport_path="<Export Path>" : [Optional] DDL export path parameter
|
||
--QxEEGenericDDLExport_db_type=<numeric value> : [Optional] Database type (0=default, 1=sqlite, 2=mysql, 3=postgresql, 4=oracle, 5=mssqlserver)
|
||
--QxEEGenericDDLExport_relation_as_fk=0/1 : [Optional] Export relationships as foreign keys in database
|
||
--QxEEGenericDDLExport_schema_type=<numeric value> : [Optional] Way to export database schema (0=full, 1=evolution, 2=full_and_evolution)
|
||
--QxEEGenericDDLExport_custom_javacript="<Custom JS>" : [Optional] Custom script (javascript file) to change the default behaviour of the export process
|
||
|
||
*** Export plugin QxEEPrinter ***
|
||
|
||
!!! Note : this plugin loads automatically previous parameters values before starting the export process !!!
|
||
|
||
*** Export plugin QxEEXmlExport ***
|
||
|
||
!!! Note : this plugin loads automatically previous parameters values before starting the export process, but you can use following parameters to override them !!!
|
||
--QxEEXmlExport_path="<Export Path>" : [Optional] XML or JSON export path parameter
|
||
--QxEEXmlExport_as_json=0/1 : [Optional] Export project as JSON format
|
||
</pre>
|
||
</i>
|
||
</div>
|
||
<br />
|
||
<b>Other note :</b> to see logs generated by QxEntityEditor application :
|
||
<ul>
|
||
<li><b>Windows :</b> use an external tool, for example <a
|
||
href="https://docs.microsoft.com/en-us/sysinternals/downloads/debugview"
|
||
target="_blank">DebugView</a> ;</li>
|
||
<li><b>Linux :</b> execute QxEntityEditor from a terminal ;</li>
|
||
<li><b>Mac OS X :</b> execute QxEntityEditor from a terminal inside <i>QxEntityEditor.app</i>
|
||
sub-directory, for example : <i>cd QxEntityEditor.app/Content/MacOS/</i>, then :
|
||
<i>./QxEntityEditor</i>
|
||
</li>
|
||
</ul>
|
||
<br /><br />
|
||
<b>-- Example n<>7 :</b> import by ODBC (plugin <i>QxEEOdbcImport</i>) a database schema :
|
||
<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --no_gui --project="<project_path>" --plugin=QxEEOdbcImport --QxEEOdbcImport_db_type=1 --QxEEOdbcImport_dsn="<your_dsn>" --QxEEOdbcImport_login="<your_login>" --QxEEOdbcImport_pwd="<your_password>" --QxEEOdbcImport_delete_namespace=1</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
<b>-- Example n<>8 :</b> import a PostgreSQL database schema (plugin <i>QxEEPostgreSQLImport</i>) :
|
||
<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --no_gui --project="<project_path>" --plugin=QxEEPostgreSQLImport --QxEEPostgreSQLImport_db_ip="<ip>" --QxEEPostgreSQLImport_db_port=5432 --QxEEPostgreSQLImport_db_name="<dbname>" --QxEEPostgreSQLImport_login="<your_login>" --QxEEPostgreSQLImport_pwd="<your_password>" --QxEEPostgreSQLImport_delete_namespace=1</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
<b>-- Example n<>9 :</b> export a QxEntityEditor project to a Source Control manager/directory Git,
|
||
Perforce, CVS, etc. (<i>QxEESourceControlExport</i> plugin) :
|
||
<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --no_gui --project="<path_to_your_qxee_project_file>" --plugin=QxEESourceControlExport --QxEESourceControlExport_path="<path_to_your_export_output_directory>"</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
<b>-- Example n<>10 :</b> import from a Source Control manager/directory Git, Perforce, CVS, etc.
|
||
(<i>QxEESourceControlImport</i> plugin) :
|
||
<br />
|
||
<div style="width:900px; height:auto; overflow:auto; background-color:white">
|
||
<i>
|
||
<pre>QxEntityEditor --project="<path_to_your_qxee_project_file>" --plugin=QxEESourceControlImport --QxEESourceControlImport_path="<path_to_the_root_source_control_json_file>"</pre>
|
||
</i>
|
||
</div>
|
||
<br /><br />
|
||
</div>
|
||
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<br>
|
||
<hr style="width: 80%" align="center" size="1" color="#100D5A">
|
||
<table border="0" style="width: 80%" align="center">
|
||
<col>
|
||
<col>
|
||
<col>
|
||
<tbody>
|
||
<tr>
|
||
<td align="left" valign="middle">
|
||
<img alt="QxOrm" src="./resource/logo_qxorm_small.png" width="168" height="40">
|
||
</td>
|
||
<td align="center" valign="middle">
|
||
<font size="2"><EFBFBD> 2011-202XDL Teamty - <a href="mailto:ic-east.com">ic-east.com</a></font>
|
||
</td>
|
||
<td align="right" valign="middle">
|
||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||
<input type="hidden" name="cmd" value="_s-xclick">
|
||
<input type="hidden" name="hosted_button_id" value="2K4Z58ZYAYJ6S">
|
||
<input type="image" src="./resource/paypal_support_qxorm_library.gif" border="0" name="submit"
|
||
alt="Support QxOrm library - PayPal">
|
||
<img alt="" border="0" src="https://www.paypalobjects.com/fr_FR/i/scr/pixel.gif" width="1" height="1">
|
||
</form>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</body>
|
||
|
||
</html> |