NAME
Net::Gnats::Session
DESCRIPTION
Represents a specific connection to Gnats.
When constructing a new session, it resets $Net::Gnats::current_session.
ACCESSORS
name
The name is a combination of database and username, a friendly handle.
It does not mean anything to GNATS.
access
Retrieves the access for the current database.
database
Sets and retrieves the current database. If a value is given then a change to the given database is made.
hostname
The hostname of the Gnats daemon process.
Default: localhost
password
The password for the user connecting to the Gnats daemon process.
Most commands require authentication.
port
The port of the Gnats daemon process.
Default: 1529
schema
Get the schema for this session. Readonly.
skip_version
Set skip_version to override Gnats version checking. By default, Net::Gnats supports v4 only.
You use this at your own risk.
username
The user connecting to the Gnats daemon process.
Most commands require authentication.
version
The Gnats daemon process version. The version will only be set after connecting.
METHODS
authenticate
Return:
0 if failue 1 if success
gconnect
Connects to Gnats. If the username and password is set, it will attempt authentication.
Connecting an already connected session infers reconnect.
disconnect
Disconnects from the current session, either authenticated or not.
issue
Issues a command using a Command object. The Command object is returned to the caller.
The Command object composes a Response, whose value(s) carry error codes and the literal values retrived from Gnats.
run
Runs a RAW command using this session. Returns RAW output.