ePages 6.11.0 - DE_EPAGES/Object/API/Table/Country.pm

Package DE_EPAGES::Object::API::Table::Country

interface for table Country

@EXPORT_OK
InsertCountry
UpdateCountry
DeleteCountry
GetAllPKeyCountries
GetAllInfoCountries
GetInfoCountry
ExistsCountry
GetPKeyCountryByCode2
GetInfoCountryByCode2
ExistsCountryByCode2
GetPKeyCountriesByCode2
GetInfoCountriesByCode2
GetPKeyCountryByCode3
GetInfoCountryByCode3
ExistsCountryByCode3
GetPKeyCountriesByCode3
GetInfoCountriesByCode3

Functions

DeleteCountry
ExistsCountry
ExistsCountryByCode2
ExistsCountryByCode3
GetAllInfoCountries
GetAllPKeyCountries
GetInfoCountriesByCode2
GetInfoCountriesByCode3
GetInfoCountry
GetInfoCountryByCode2
GetInfoCountryByCode3
GetPKeyCountriesByCode2
GetPKeyCountriesByCode3
GetPKeyCountryByCode2
GetPKeyCountryByCode3
InsertCountry
UpdateCountry

DeleteCountry

Deletes a(n) Country.

Syntax
DeleteCountry($CountryID);
DeleteCountry($hCountry); # if $hCountry includes CountryID
Input
$CountryID (int)
country identifier - iso num code (primary key)

ExistsCountry

Returns true if the Country exists.

Syntax
$exists = ExistsCountry($CountryID);
Input
$CountryID (int)
country identifier - iso num code
Return
$exists (boolean)
1/0 the Country exists (yes/no)

ExistsCountryByCode2

Returns true if a Country by alternate key Code2 exists.

Syntax
$CountryID = ExistsCountryByCode2($Code2);
Input
$Code2 (char(2))
country iso code alpha 2
Return
$exists (boolean)
1/0 the u_iso3166_1_alpha_2 exists (yes/no)

ExistsCountryByCode3

Returns true if a Country by alternate key Code3 exists.

Syntax
$CountryID = ExistsCountryByCode3($Code3);
Input
$Code3 (char(3))
country iso code alpha 3
Return
$exists (boolean)
1/0 the u_iso3166_1_alpha_3 exists (yes/no)

GetAllInfoCountries

Returns all objects of Country.

Syntax
$ahCountrys = GetAllInfoCountries();
Return
$ahCountrys (reference to array of hashes)
with following keys:
  • CountryID - country identifier - iso num code (primary key)- int
  • IsUsed - is used / enabled - bit
  • Code2 - country iso code alpha 2 - char(2)
  • Code3 - country iso code alpha 3 - char(3)
  • English - english name - nvarchar(255)
  • French - french name (optional)- nvarchar(255)
  • Native - native name (optional)- nvarchar(255)
  • IsEU - is eu country - bit

GetAllPKeyCountries

Returns all Country identifiers.

Syntax
$aCountryIDs = GetAllPKeyCountries();
Return
$aCountryIDs (reference to array of int)
country identifier - iso num code

GetInfoCountriesByCode2

Returns objects of Country by alternate key Code2.

Syntax
$ahCountries = GetInfoCountriesByCode2($Code2);
Input
$Code2 (char(2))
country iso code alpha 2
Return
$ahCountries (reference to array of hashes)
with following keys:
  • CountryID - country identifier - iso num code (primary key)- int
  • IsUsed - is used / enabled - bit
  • Code2 - country iso code alpha 2 - char(2)
  • Code3 - country iso code alpha 3 - char(3)
  • English - english name - nvarchar(255)
  • French - french name (optional)- nvarchar(255)
  • Native - native name (optional)- nvarchar(255)
  • IsEU - is eu country - bit

GetInfoCountriesByCode3

Returns objects of Country by alternate key Code3.

Syntax
$ahCountries = GetInfoCountriesByCode3($Code3);
Input
$Code3 (char(3))
country iso code alpha 3
Return
$ahCountries (reference to array of hashes)
with following keys:
  • CountryID - country identifier - iso num code (primary key)- int
  • IsUsed - is used / enabled - bit
  • Code2 - country iso code alpha 2 - char(2)
  • Code3 - country iso code alpha 3 - char(3)
  • English - english name - nvarchar(255)
  • French - french name (optional)- nvarchar(255)
  • Native - native name (optional)- nvarchar(255)
  • IsEU - is eu country - bit

GetInfoCountry

Returns the Country by identifier.

Syntax
$hCountry = GetInfoCountry($CountryID);
Input
$CountryID (int)
country identifier - iso num code (primary key)
Return
$hCountry (reference to hash)
with following keys:
  • CountryID - country identifier - iso num code (primary key)- int
  • IsUsed - is used / enabled - bit
  • Code2 - country iso code alpha 2 - char(2)
  • Code3 - country iso code alpha 3 - char(3)
  • English - english name - nvarchar(255)
  • French - french name (optional)- nvarchar(255)
  • Native - native name (optional)- nvarchar(255)
  • IsEU - is eu country - bit

GetInfoCountryByCode2

Returns the object of Country by alternate key Code2.

Syntax
$hCountry = GetInfoCountryByCode2($Code2);
Input
$Code2 (char(2))
country iso code alpha 2
Return
$hCountry (reference to hash)
with following keys:
  • CountryID - country identifier - iso num code (primary key)- int
  • IsUsed - is used / enabled - bit
  • Code2 - country iso code alpha 2 - char(2)
  • Code3 - country iso code alpha 3 - char(3)
  • English - english name - nvarchar(255)
  • French - french name (optional)- nvarchar(255)
  • Native - native name (optional)- nvarchar(255)
  • IsEU - is eu country - bit

GetInfoCountryByCode3

Returns the object of Country by alternate key Code3.

Syntax
$hCountry = GetInfoCountryByCode3($Code3);
Input
$Code3 (char(3))
country iso code alpha 3
Return
$hCountry (reference to hash)
with following keys:
  • CountryID - country identifier - iso num code (primary key)- int
  • IsUsed - is used / enabled - bit
  • Code2 - country iso code alpha 2 - char(2)
  • Code3 - country iso code alpha 3 - char(3)
  • English - english name - nvarchar(255)
  • French - french name (optional)- nvarchar(255)
  • Native - native name (optional)- nvarchar(255)
  • IsEU - is eu country - bit

GetPKeyCountriesByCode2

Returns primary keys of Country by alternate key Code2.

Syntax
$aKeys = GetPKeyCountriesByCode2($Code2);
Input
$Code2 (char(2))
country iso code alpha 2
Return
$aKeys (reference to array of int)
country identifier - iso num code (primary key)

GetPKeyCountriesByCode3

Returns primary keys of Country by alternate key Code3.

Syntax
$aKeys = GetPKeyCountriesByCode3($Code3);
Input
$Code3 (char(3))
country iso code alpha 3
Return
$aKeys (reference to array of int)
country identifier - iso num code (primary key)

GetPKeyCountryByCode2

Returns primary key of Country by alternate key Code2.

Syntax
$CountryID = GetPKeyCountryByCode2($Code2);
Input
$Code2 (char(2))
country iso code alpha 2
Return
$CountryID (int)
country identifier - iso num code (primary key)

GetPKeyCountryByCode3

Returns primary key of Country by alternate key Code3.

Syntax
$CountryID = GetPKeyCountryByCode3($Code3);
Input
$Code3 (char(3))
country iso code alpha 3
Return
$CountryID (int)
country identifier - iso num code (primary key)

InsertCountry

Creates an entry of Country.

Syntax
InsertCountry($hCountry);
Input
$hCountry (reference to hash)
with following keys:
  • CountryID - country identifier - iso num code (primary key)- int
  • IsUsed - is used / enabled - bit
  • Code2 - country iso code alpha 2 - char(2)
  • Code3 - country iso code alpha 3 - char(3)
  • English - english name - nvarchar(255)
  • French - french name (optional)- nvarchar(255)
  • Native - native name (optional)- nvarchar(255)
  • IsEU - is eu country - bit

UpdateCountry

Updates a(n) Country if any element was changed.

Syntax
UpdateCountry($CountryID, $hCountry);
UpdateCountry($hCountry); # if $hCountry includes CountryID
Input
$CountryID (int)
country identifier - iso num code (primary key)
$hCountry (reference to hash)
with following keys:
  • IsUsed - is used / enabled - bit
  • Code2 - country iso code alpha 2 - char(2)
  • Code3 - country iso code alpha 3 - char(3)
  • English - english name - nvarchar(255)
  • French - french name (optional)- nvarchar(255)
  • Native - native name (optional)- nvarchar(255)
  • IsEU - is eu country - bit