https://wiki.freepascal.org/index.php?title=SQLDBRestSchemaEditor&feed=atom&action=historySQLDBRestSchemaEditor - Revision history2024-03-29T05:20:06ZRevision history for this page on the wikiMediaWiki 1.35.6https://wiki.freepascal.org/index.php?title=SQLDBRestSchemaEditor&diff=124533&oldid=prevMichael: /* Introduction */2019-05-11T20:08:03Z<p><span dir="auto"><span class="autocomment">Introduction</span></span></p>
<table class="diff diff-contentalign-left diff-editfont-monospace" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 20:08, 11 May 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l2" >Line 2:</td>
<td colspan="2" class="diff-lineno">Line 2:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The SQLDBRestBridge schema editor allows you to edit schema files for a [[SQLDBRestBridge <del class="diffchange diffchange-inline">SQLDBRestBridge schema</del>]]. </div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The SQLDBRestBridge schema editor allows you to edit schema files for a [[SQLDBRestBridge]] <ins class="diffchange diffchange-inline">schema</ins>. </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The editor is implemented in the sqldbrestschemadesigner.lpk package and included in the Lazarus IDE if you register the lazsqldbrest.lpk package. </div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The editor is implemented in the sqldbrestschemadesigner.lpk package and included in the Lazarus IDE if you register the lazsqldbrest.lpk package. </div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>It can also be compiled as a standalone application, the application is located in the <del class="diffchange diffchange-inline">schemaeditor </del>project under the components/<del class="diffchange diffchange-inline">fpweb </del>directory.</div></td><td class='diff-marker'>+</td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>It can also be compiled as a standalone application, the application is located in the <ins class="diffchange diffchange-inline">editor </ins>project under the components/<ins class="diffchange diffchange-inline">sqldbrestb </ins>directory.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The standalone editor can be used to create schema files, which can be used to load schemas using the '''LoadFromFile''' method.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The standalone editor can be used to create schema files, which can be used to load schemas using the '''LoadFromFile''' method.</div></td></tr>
</table>Michaelhttps://wiki.freepascal.org/index.php?title=SQLDBRestSchemaEditor&diff=124532&oldid=prevMichael: Created page with "== Introduction == The SQLDBRestBridge schema editor allows you to edit schema files for a SQLDBRestBridge SQLDBRestBridge schema. The editor is implemented in the sql..."2019-05-11T20:05:17Z<p>Created page with "== Introduction == The SQLDBRestBridge schema editor allows you to edit schema files for a <a href="/index.php?title=SQLDBRestBridge_SQLDBRestBridge_schema&action=edit&redlink=1" class="new" title="SQLDBRestBridge SQLDBRestBridge schema (page does not exist)">SQLDBRestBridge SQLDBRestBridge schema</a>. The editor is implemented in the sql..."</p>
<p><b>New page</b></p><div>== Introduction ==<br />
<br />
<br />
The SQLDBRestBridge schema editor allows you to edit schema files for a [[SQLDBRestBridge SQLDBRestBridge schema]]. <br />
<br />
The editor is implemented in the sqldbrestschemadesigner.lpk package and included in the Lazarus IDE if you register the lazsqldbrest.lpk package. <br />
It can also be compiled as a standalone application, the application is located in the schemaeditor project under the components/fpweb directory.<br />
<br />
The standalone editor can be used to create schema files, which can be used to load schemas using the '''LoadFromFile''' method.<br />
<br />
== Workings ==<br />
<br />
The schema editor has one form, which looks as follows when a schema is loaded.<br />
<br />
<br />
[[File:sqldbrestschemaeditor-schema.png]]<br />
<br />
The left side ''Available connections'' shows the known connections, and for each connection to a database, the tables in the database can be shown.<br />
Using drag & drop, the tables (you can select multiple tables at once) can be dragged to the middle part of the screen. <br />
The known connections can be hidden using the button above the tree.<br />
<br />
<br />
The middle part of the screen ''Available Resources'' shows the resources defined in the schema. <br />
You can add new resources by dragging them from the connections, or using the 'Add resource' button.<br />
<br />
<br />
The right part of the screen shows the details of the item selected in the ''Available resources''.<br />
This can be one of 4 details<br />
# When the schema node is selected, the list of tables is shown (see the above screenshot). You can double click a resource, and the selected resource will be shown for editing.<br />
# When a resource node is selected, the resource editor is shown (see below) <br />
# When the 'fields' node below a resource node is selected, the list of fields is shown. You can double click a field, and the selected field will be shown for editing.<br />
# When a field node is selected, the field editor is shown.<br />
<br />
Changes to a current node are automatically saved when selecting another node.<br />
<br />
A double click on a selected node will show the same editor as selecting a node, but in a modal dialog.<br />
<br />
<br />
You can add new resources by dragging them from the connections, or using the 'Add resource' button. <br />
The 'expose connection' above the list of connections will add all tables of a connection to the schema.<br />
<br />
The menu allows several actions:<br />
<br />
[[File:sqldbrestschemaeditor-menu.png]]<br />
<br />
<br />
# '''Read connections''' Loads a list of connection details from an .ini file.<br />
# '''Write connections''' Saves the list of connections shown in the left panel to an .ini file.<br />
# '''New schema''' Creates a new empty schema.<br />
# '''Load schema''' Loads a schema file and displays the resources. <br />
# '''Save schema''' Saves the resources to a schema file. <br />
# '''Recent schemas''' a MRU menu with recently loaded or saved schema files.<br />
# '''Quit''' exits the program.<br />
<br />
A schema file has the .srs extension, but this is not obligatory. It is a JSON file created by the SaveToFile method of the TSQLDBRestSchema class, and can be loaded with the LoadFromFile method.<br />
<br />
<br />
== Resource editor ==<br />
The resource editor is shown when a resource is selected in the available resources tree. It looks as follows:<br />
<br />
[[File:sqldbrestschemaeditor-table.png]]<br />
<br />
The various edits correspond to the properties of the TSQLDBRestResource class.<br />
<br />
The 4 tabs at the bottom can be used to edit the SQL Statements. <br />
<br />
The ''SELECT'' statement can be automatically generated from the table name. The entered statement can also be validated, to check if the SQL is correct.<br />
When the SQL SELECT Statement has changed, the list of published fields can be automatically refreshed using the 'Update Fields' button.<br />
This will reset the fields list, so any adjustments that were made to the list of fields will be lost.<br />
<br />
The last tab displays the list of fields defined for the resource. <br />
<br />
[[File:sqldbrestschemaeditor-table-fields.png]]<br />
<br />
This list should be identical to the list in the treeview. <br />
Double-clicking a field will display the field editor.<br />
<br />
<br />
== Field editor ==<br />
<br />
The field editor shows the properties of a selected field. These are the properties of the TSQLDBRestField class. It looks as follows:<br />
<br />
[[File:sqldbrestschemaeditor-field.png]]<br />
<br />
== Fields editor ==<br />
<br />
The fields editor is shown when the 'Fields' node is selected in the resource tree. It is currently read-only, and looks as follows:<br />
<br />
[[File:sqldbrestschemaeditor-fields.png]]<br />
<br />
Double clicking a field will take you to the field editor for the selected field.</div>Michael