mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-07 15:22:31 +01:00
Update wikipage Data structures creation. (Signed-off-by:jocelyn).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1529 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -79,7 +79,7 @@ Let us take an example:
|
|||||||
| template file extract
|
| template file extract
|
||||||
| corresponding result file extract
|
| corresponding result file extract
|
||||||
|-
|
|-
|
||||||
| attribute_count: <ACNT>
|
| attribute_count: <code><ACNT></code>
|
||||||
| attribute_count: 5
|
| attribute_count: 5
|
||||||
|}
|
|}
|
||||||
|
|
||||||
@@ -91,10 +91,8 @@ Let us take an example:
|
|||||||
| template file extract
|
| template file extract
|
||||||
| corresponding result file extract
|
| corresponding result file extract
|
||||||
|-
|
|-
|
||||||
| <A:A:A><AN:L>: <TN:U> <br/>
|
| <code><A:A:A><AN:L>: <TN:U></code> <br/><code></A></code>
|
||||||
</A>
|
| <eiffel>companyid: DOUBLE</eiffel> <br/><eiffel>companyname: STRING</eiffel>
|
||||||
| companyid: DOUBLE <br/>
|
|
||||||
companyname: STRING
|
|
||||||
|}
|
|}
|
||||||
|
|
||||||
Text contained in the tag 'A' is mapped to each table (or view) attribute and the resulting texts are concatenated. Let us see now the details about each tag.
|
Text contained in the tag 'A' is mapped to each table (or view) attribute and the resulting texts are concatenated. Let us see now the details about each tag.
|
||||||
@@ -118,7 +116,7 @@ The available tags for database table classes generation can be separated into 3
|
|||||||
| '''Option name'''
|
| '''Option name'''
|
||||||
| '''Option description'''
|
| '''Option description'''
|
||||||
|-
|
|-
|
||||||
| <CN:?>
|
| <code><CN:?></code>
|
||||||
| Table name
|
| Table name
|
||||||
| U
|
| U
|
||||||
| in uppercase
|
| in uppercase
|
||||||
@@ -129,7 +127,7 @@ The available tags for database table classes generation can be separated into 3
|
|||||||
| L
|
| L
|
||||||
| in lowercase
|
| in lowercase
|
||||||
|-
|
|-
|
||||||
| <ACNT>
|
| <code><ACNT></code>
|
||||||
| Attribute count
|
| Attribute count
|
||||||
| N/A
|
| N/A
|
||||||
|}
|
|}
|
||||||
@@ -144,7 +142,7 @@ The available tags for database table classes generation can be separated into 3
|
|||||||
| '''Option name'''
|
| '''Option name'''
|
||||||
| '''Option description'''
|
| '''Option description'''
|
||||||
|-
|
|-
|
||||||
| <AN:?>
|
| <code><AN:?></code>
|
||||||
| Attribute name
|
| Attribute name
|
||||||
| U
|
| U
|
||||||
| in uppercase
|
| in uppercase
|
||||||
@@ -155,11 +153,11 @@ The available tags for database table classes generation can be separated into 3
|
|||||||
| L
|
| L
|
||||||
| in lowercase
|
| in lowercase
|
||||||
|-
|
|-
|
||||||
| <IT>
|
| <code><IT></code>
|
||||||
| Attribute position in the table
|
| Attribute position in the table
|
||||||
| N/A
|
| N/A
|
||||||
|-
|
|-
|
||||||
| <TN:?>
|
| <code><TN:?></code>
|
||||||
| Attribute type name
|
| Attribute type name
|
||||||
| U
|
| U
|
||||||
| in uppercase
|
| in uppercase
|
||||||
@@ -170,7 +168,7 @@ The available tags for database table classes generation can be separated into 3
|
|||||||
| L
|
| L
|
||||||
| in lowercase
|
| in lowercase
|
||||||
|-
|
|-
|
||||||
| <TDV>
|
| <code><TDV></code>
|
||||||
| Attribute type default value
|
| Attribute type default value
|
||||||
| N/A
|
| N/A
|
||||||
|}
|
|}
|
||||||
@@ -179,7 +177,7 @@ The available tags for database table classes generation can be separated into 3
|
|||||||
|
|
||||||
=====2.3.1.3. Enclosing tags=====
|
=====2.3.1.3. Enclosing tags=====
|
||||||
|
|
||||||
The tag <A:?:?> </A> encloses text that will be mapped to attributes matching criteria. These criteria are specified by the tag options:
|
The tag <code><A:?:?> </A></code> encloses text that will be mapped to attributes matching criteria. These criteria are specified by the tag options:
|
||||||
* First option: attribute type criterion
|
* First option: attribute type criterion
|
||||||
{| border="1"
|
{| border="1"
|
||||||
|-
|
|-
|
||||||
@@ -250,7 +248,7 @@ The meaning of available tags is so modified:
|
|||||||
| '''Tag name'''
|
| '''Tag name'''
|
||||||
| '''Tag description'''
|
| '''Tag description'''
|
||||||
|-
|
|-
|
||||||
| <ACNT>
|
| <code><ACNT></code>
|
||||||
| Table count
|
| Table count
|
||||||
|}
|
|}
|
||||||
|
|
||||||
@@ -264,7 +262,7 @@ The meaning of available tags is so modified:
|
|||||||
| '''Option name'''
|
| '''Option name'''
|
||||||
| '''Option description'''
|
| '''Option description'''
|
||||||
|-
|
|-
|
||||||
| <CN:?>
|
| <code><CN:?></code>
|
||||||
| Table name
|
| Table name
|
||||||
| U
|
| U
|
||||||
| in uppercase
|
| in uppercase
|
||||||
@@ -275,14 +273,14 @@ The meaning of available tags is so modified:
|
|||||||
| L
|
| L
|
||||||
| in lowercase
|
| in lowercase
|
||||||
|-
|
|-
|
||||||
| <IT>
|
| <code><IT></code>
|
||||||
| Table position in the database
|
| Table position in the database
|
||||||
| N/A
|
| N/A
|
||||||
|}
|
|}
|
||||||
|
|
||||||
=====2.3.2.3. Enclosing tags=====
|
=====2.3.2.3. Enclosing tags=====
|
||||||
|
|
||||||
The tag <A:A:?> </A> encloses text that will be mapped to tables matching a position criterion. This criterion is specified by the tag options:
|
The tag <code><A:A:?> </A></code> encloses text that will be mapped to tables matching a position criterion. This criterion is specified by the tag options:
|
||||||
{| border="1"
|
{| border="1"
|
||||||
|-
|
|-
|
||||||
| '''Option name'''
|
| '''Option name'''
|
||||||
@@ -326,7 +324,7 @@ The wizard uses one different template for each class.
|
|||||||
===3.1. Table classes===
|
===3.1. Table classes===
|
||||||
|
|
||||||
For each selected database table, a class is created from the same template, mapping the database table. This template is:
|
For each selected database table, a class is created from the same template, mapping the database table. This template is:
|
||||||
<code>
|
<eiffel>
|
||||||
indexing
|
indexing
|
||||||
description: "Class which allows EiffelStore to retrieve/store%
|
description: "Class which allows EiffelStore to retrieve/store%
|
||||||
%the content of a table row from database table <CN:U>"
|
%the content of a table row from database table <CN:U>"
|
||||||
@@ -393,14 +391,14 @@ For each selected database table, a class is created from the same template, map
|
|||||||
|
|
||||||
end -- class CODES
|
end -- class CODES
|
||||||
|
|
||||||
</code>
|
</eiffel>
|
||||||
|
|
||||||
'''Note''': the template content can be adjusted, for instance to add comments or change the indexing. However, the fundamental template structure should not be changed to use data structures as described in the [[Data structures use|corresponding section]] .
|
'''Note''': the template content can be adjusted, for instance to add comments or change the indexing. However, the fundamental template structure should not be changed to use data structures as described in the [[Data structures use|corresponding section]] .
|
||||||
|
|
||||||
===3.2. Description classes===
|
===3.2. Description classes===
|
||||||
|
|
||||||
For each selected database table, a class is also created from a unique template, mapping the database table. This template is:
|
For each selected database table, a class is also created from a unique template, mapping the database table. This template is:
|
||||||
<code>
|
<eiffel>
|
||||||
indexing
|
indexing
|
||||||
description: "Description of class <CN:U>"
|
description: "Description of class <CN:U>"
|
||||||
author: "EiffelStore Wizard"
|
author: "EiffelStore Wizard"
|
||||||
@@ -566,19 +564,19 @@ For each selected database table, a class is also created from a unique template
|
|||||||
-- Piece of <CN:L> associated with the description
|
-- Piece of <CN:L> associated with the description
|
||||||
|
|
||||||
end -- class CODES_DESCRIPTION
|
end -- class CODES_DESCRIPTION
|
||||||
</code>
|
</eiffel>
|
||||||
|
|
||||||
'''Note''': As for the table class generation, the template content can be adjusted, for instance to add comments or change the indexing. However, the fundamental template structure should not be changed.
|
'''Note''': As for the table class generation, the template content can be adjusted, for instance to add comments or change the indexing. However, the fundamental template structure should not be changed.
|
||||||
|
|
||||||
Some additional tags are directly replaced by the wizard:
|
Some additional tags are directly replaced by the wizard:
|
||||||
* The <CR> and <DR> tags are replaced with information on associated tables.
|
* The <code><CR></code> and <code><DR></code> tags are replaced with information on associated tables.
|
||||||
* The <IC> tag is replaced by information on the primary key (table ID).
|
* The <code><IC></code> tag is replaced by information on the primary key (table ID).
|
||||||
* The <CI> tag is replaced by the table position in the database.
|
* The <code><CI></code> tag is replaced by the table position in the database.
|
||||||
|
|
||||||
===2.3.3. Access class===
|
===2.3.3. Access class===
|
||||||
|
|
||||||
The <eiffel>DB_SPECIFIC_TABLES_ACCESS</eiffel> class is mapped to the database from the following template:
|
The <eiffel>DB_SPECIFIC_TABLES_ACCESS</eiffel> class is mapped to the database from the following template:
|
||||||
<code>
|
<eiffel>
|
||||||
indexing
|
indexing
|
||||||
description: "Description of database tables.%
|
description: "Description of database tables.%
|
||||||
%Use this class through DB_SPECIFIC_TABLES_ACCESS_USE."
|
%Use this class through DB_SPECIFIC_TABLES_ACCESS_USE."
|
||||||
@@ -647,9 +645,5 @@ The <eiffel>DB_SPECIFIC_TABLES_ACCESS</eiffel> class is mapped to the database f
|
|||||||
</A>
|
</A>
|
||||||
|
|
||||||
end -- class DB_SPECIFIC_TABLES_ACCESS
|
end -- class DB_SPECIFIC_TABLES_ACCESS
|
||||||
</code>
|
</eiffel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user