Difference between revisions of "Int field"

From EPrints Documentation
Jump to: navigation, search
(Added examples and moved description to top. Unhid ToC)
m
Line 1: Line 1:
 
{{fieldtypes}}
 
{{fieldtypes}}
 +
  
 
== Description ==
 
== Description ==
Line 8: Line 9:
 
** [[Int field]]
 
** [[Int field]]
  
== Properties ==
+
== Additional Properties ==
 
{| border="1" cellpadding="3" cellspacing="0"
 
{| border="1" cellpadding="3" cellspacing="0"
 
| name || default || description  
 
| name || default || description  
Line 16: Line 17:
  
 
== Required Phrases ==
 
== Required Phrases ==
No additional phrases.
+
No additional phrases beyond [[Metadata#Required_Phrases|standard metadata field 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)
  

Revision as of 10:03, 9 April 2023

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


Metadata Fields: Arclanguage - Base64 - Bigint - Boolean - Compound - Counter - Dataobjref - Date - Decimal - Email - Fields - Float - Id - Idci - Image - Int - Itemref - Keywords - Langid - Longtext - Longtext_counter - Multilang - Multipart - Name - Namedset - Pagerange - Recaptcha - Relation - Search - Secret - Set - Storable - Subject - Subobject - Text - Time - Timestamp - Url - Uuid


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

Additional Properties

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

Required Phrases

No additional phrases beyond standard metadata field 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,
},