⧼vector-jumptocontent⧽

Int field: Difference between revisions

From EPrints Documentation
Moj (talk | contribs)
No edit summary
Added examples and moved description to top. Unhid ToC
Line 1: Line 1:
{{fieldtypes}}
{{fieldtypes}}
__NOTOC__
 
== Description ==
This metadata field is for store whole number values.  Such as the number of pages of a publication or number of pieces that make up an exhibition-type publication.
 
== Inheritance ==
== Inheritance ==
* [[Metadata]]
* [[Metadata]]
** [[Int field]]
** [[Int field]]
== Description ==


== Properties ==
== Properties ==
{| border="1" cellpadding="3" cellspacing="0"
{| border="1" cellpadding="3" cellspacing="0"
| name || default || description  
| name || default || description  
Line 17: Line 16:


== Required Phrases ==
== Required Phrases ==
 
No additional phrases.


== Database ==
== Database ==
Int fields are stored in the database as
Int fields are stored in the database as


  fieldname INT(11)
  fieldname INT(11)
== API ==
See [[API:EPrints/MetaField/Int|API page]].
== Examples ==
Most basic example.
{
    name => 'num_pieces',
    type => 'int',
},
Limit input field to six characters (digits) and do not create a SQL database table index.
{
    name => 'pages',
    type => 'int',
    maxlength => 6,
    sql_index => 0,
},

Revision as of 20:57, 21 March 2023

Description

This metadata field is for store whole number values. Such as the number of pages of a publication or number of pieces that make up an exhibition-type publication.

Inheritance

Properties

name default description
digits n/a This property is taken from the repository configuration.

Required Phrases

No additional phrases.

Database

Int fields are stored in the database as

fieldname INT(11)

API

See API page.

Examples

Most basic example.

{
    name => 'num_pieces',
    type => 'int',
},

Limit input field to six characters (digits) and do not create a SQL database table index.

{
    name => 'pages',
    type => 'int',
    maxlength => 6,
    sql_index => 0,
},