ePages 6.10 - DE_EPAGES/WebInterfacePoolDB/API/Table/Host.pm

Package DE_EPAGES::WebInterfacePoolDB::API::Table::Host

interface for table Host

@EXPORT_OK
InsertHost
UpdateHost
DeleteHost
GetAllPKeyHosts
GetAllInfoHosts
GetInfoHost
ExistsHost
GetPKeyHostByName
GetInfoHostByName
ExistsHostByName
GetPKeyHostsByName
GetInfoHostsByName
GetPKeyHostsBySiteID
GetInfoHostsBySiteID

Functions

DeleteHost
ExistsHost
ExistsHostByName
GetAllInfoHosts
GetAllPKeyHosts
GetInfoHost
GetInfoHostByName
GetInfoHostsByName
GetInfoHostsBySiteID
GetPKeyHostByName
GetPKeyHostsByName
GetPKeyHostsBySiteID
InsertHost
UpdateHost

DeleteHost

Deletes a(n) Host.

Syntax
DeleteHost($HostID);
DeleteHost($hHost); # if $hHost includes HostID
Input
$HostID (int)
host id (primary key)

ExistsHost

Returns true if the Host exists.

Syntax
$exists = ExistsHost($HostID);
Input
$HostID (int)
host id
Return
$exists (boolean)
1/0 the Host exists (yes/no)

ExistsHostByName

Returns true if a Host by alternate key Name exists.

Syntax
$HostID = ExistsHostByName($Name);
Input
$Name (varchar(128))
web server name
Return
$exists (boolean)
1/0 the u_host_name exists (yes/no)

GetAllInfoHosts

Returns all objects of Host.

Syntax
$ahHosts = GetAllInfoHosts();
Return
$ahHosts (reference to array of hashes)
with following keys:
  • HostID - host id (primary key)- int
  • Name - web server name - varchar(128)
  • SiteID - site owner (optional)- int

GetAllPKeyHosts

Returns all Host identifiers.

Syntax
$aHostIDs = GetAllPKeyHosts();
Return
$aHostIDs (reference to array of int)
host id

GetInfoHost

Returns the Host by identifier.

Syntax
$hHost = GetInfoHost($HostID);
Input
$HostID (int)
host id (primary key)
Return
$hHost (reference to hash)
with following keys:
  • HostID - host id (primary key)- int
  • Name - web server name - varchar(128)
  • SiteID - site owner (optional)- int

GetInfoHostByName

Returns the object of Host by alternate key Name.

Syntax
$hHost = GetInfoHostByName($Name);
Input
$Name (varchar(128))
web server name
Return
$hHost (reference to hash)
with following keys:
  • HostID - host id (primary key)- int
  • Name - web server name - varchar(128)
  • SiteID - site owner (optional)- int

GetInfoHostsByName

Returns objects of Host by alternate key Name.

Syntax
$ahHosts = GetInfoHostsByName($Name);
Input
$Name (varchar(128))
web server name
Return
$ahHosts (reference to array of hashes)
with following keys:
  • HostID - host id (primary key)- int
  • Name - web server name - varchar(128)
  • SiteID - site owner (optional)- int

GetInfoHostsBySiteID

Returns objects of Host by alternate key SiteID.

Syntax
$ahHosts = GetInfoHostsBySiteID($SiteID);
Input
$SiteID (int)
site owner
Return
$ahHosts (reference to array of hashes)
with following keys:
  • HostID - host id (primary key)- int
  • Name - web server name - varchar(128)
  • SiteID - site owner (optional)- int

GetPKeyHostByName

Returns primary key of Host by alternate key Name.

Syntax
$HostID = GetPKeyHostByName($Name);
Input
$Name (varchar(128))
web server name
Return
$HostID (int)
host id (primary key)

GetPKeyHostsByName

Returns primary keys of Host by alternate key Name.

Syntax
$aKeys = GetPKeyHostsByName($Name);
Input
$Name (varchar(128))
web server name
Return
$aKeys (reference to array of int)
host id (primary key)

GetPKeyHostsBySiteID

Returns primary keys of Host by alternate key SiteID.

Syntax
$aKeys = GetPKeyHostsBySiteID($SiteID);
Input
$SiteID (int)
site owner
Return
$aKeys (reference to array of int)
host id (primary key)

InsertHost

Creates an entry of Host.

Syntax
$HostID = InsertHost($hHost);
Input
$hHost (reference to hash)
with following keys:
  • HostID - host id (primary key)(optional)- int
  • Name - web server name - varchar(128)
  • SiteID - site owner (optional)- int
Return
$HostID (int)
host id (primary key)

UpdateHost

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

Syntax
UpdateHost($HostID, $hHost);
UpdateHost($hHost); # if $hHost includes HostID
Input
$HostID (int)
host id (primary key)
$hHost (reference to hash)
with following keys:
  • Name - web server name - varchar(128)
  • SiteID - site owner (optional)- int