1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Updated docs

This commit is contained in:
zYne 2006-09-29 10:58:38 +00:00
parent 14b95350d0
commit 1ff90159d6
2 changed files with 211 additions and 35 deletions

View File

@ -0,0 +1,2 @@
Natural identifier is a property or combination of properties that is unique and non-null. The use of natural identifiers
is discouraged. You should consider using autoincremented or sequential primary keys as they make your system more scalable.

View File

@ -1,35 +1,209 @@
Following data types and constraints are availible in doctrine Following attributes are availible for columns
<ul> <table>
<li /><b> unique</b>
<ul> Acts as database level unique constraint. Also validates that the specified column is unique. <tr>
</ul> <td>
<li /><b> nospace</b> <b class='title' valign='top'>name</b>
<ul> Nospace validator. This validator validates that specified column doesn't contain any space/newline characters. <br /> </td>
</ul> <td>
<li /><b> notblank</b> <b class='title' valign='top'>args</b>
<ul> Notblank validator. This validator validates that specified column doesn't contain only space/newline characters. Useful in for example comment posting applications </td>
where users are not allowed to post empty comments. <br /> <td>
</ul> <b class='title'>description</b>
<li /><b> notnull</b> </td>
<dd /> Acts as database level notnull constraint as well as notnull validator for the specified column.<br /> </tr>
<li /><b> email</b> <tr>
<dd /> Email validator. Validates that specified column is a valid email address. <td colspan=3>
<li /><b> date</b> <hr>
<dd /> Date validator. </td>
<li /><b> range:[args]</b>
<dd /> Range validator, eg range:1-32 </tr>
<li /><b> enum:[args]</b> <tr>
<dd /> Enum validator, eg enum:city1-city2-city3 <td colspan=3>
<li /><b> country</b> &raquo;&raquo; Basic attributes
<ul> Country code validator validates that specified column has a valid country code. <hr class='small'>
</ul> </td>
<li /><b> regexp:[args]</b> </tr>
<ul> Regular expression validator validates that specified column matches a regular expression, eg regexp:[John] <tr>
</ul> <td class='title' valign='top'>
<li /><b> ip</b> <b>primary</b>
<ul> Ip validator validates that specified column is a valid internet protocol address. </td>
</ul> <td class='title' valign='top'>
<li /><b> usstate</b> bool true
<ul> Usstate validator validates that specified column is a valid usstate. </td>
</ul> <td class='title' valign='top'>
</ul> Defines column as a primary key column.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>autoincrement</b>
</td>
<td class='title' valign='top'>
bool true
</td>
<td class='title' valign='top'>
Defines column as autoincremented column. If the underlying database doesn't support autoincrementation natively its emulated with triggers and sequence tables.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>default</b>
</td>
<td class='title' valign='top'>
mixed default
</td>
<td class='title' valign='top'>
Sets <i>default</i> as an application level default value for a column. When default value has been set for a column every time a record is created the specified column has the <i>default</i> as its value.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>enum</b>
</td>
<td class='title' valign='top'>
array enum
</td>
<td class='title' valign='top'>
Sets <i>enum</i> as an application level enum value list for a column.
</td>
</tr>
<tr>
<td colspan=3>
&raquo;&raquo; Basic validators
<hr class='small'>
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>unique</b>
</td>
<td class='title' valign='top'>
bool true
</td>
<td class='title' valign='top'>
Acts as database level unique constraint. Also validates that the specified column is unique.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>nospace</b>
</td>
<td class='title' valign='top'>
bool true
</td>
<td class='title' valign='top'>
Nospace validator. This validator validates that specified column doesn't contain any space/newline characters. <br />
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>notblank</b>
</td>
<td class='title' valign='top'>
bool true
</td>
<td class='title' valign='top'>
Notblank validator. This validator validates that specified column doesn't contain only space/newline characters. Useful in for example comment posting applications
where users are not allowed to post empty comments.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>notnull</b>
</td>
<td class='title' valign='top'>
bool true
</td>
<td class='title' valign='top'>
Acts as database level notnull constraint as well as notnull validator for the specified column.
</td>
</tr>
<tr>
<td colspan=3>
&raquo;&raquo; Advanced validators
<hr class='small'>
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>email</b>
</td>
<td class='title' valign='top'>
bool true
</td>
<td class='title' valign='top'>
Email validator. Validates that specified column is a valid email address.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>date</b>
</td>
<td class='title' valign='top'>
bool true
</td>
<td class='title' valign='top'>
Date validator.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>range</b>
</td>
<td class='title' valign='top'>
array(min, max)
</td>
<td class='title' valign='top'>
Range validator. Validates that the column is between <i>min</i> and <i>max</i>.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>country</b>
</td>
<td class='title' valign='top'>
bool true
</td>
<td class='title' valign='top'>
Country code validator validates that specified column has a valid country code.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>regexp </b>
</td>
<td class='title' valign='top'>
string regexp
</td>
<td class='title' valign='top'>
Regular expression validator validates that specified column matches <i>regexp</i>.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>ip</b>
</td>
<td class='title' valign='top'>
bool true
</td>
<td class='title' valign='top'>
Ip validator validates that specified column is a valid internet protocol address.
</td>
</tr>
<tr>
<td class='title' valign='top'>
<b>usstate</b>
</td>
<td class='title' valign='top'>
bool true
</td>
<td class='title' valign='top'>
Usstate validator validates that specified column is a valid usstate.
</td>
</tr>
</table>