Kx

Kx is a Perl extension for Kdb+
Download

Kx Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Mark Pfeiffer
  • Publisher web site:
  • http://search.cpan.org/~markpf/Spread-Message-0.21/Message.pm

Kx Tags


Kx Description

Kx is a Perl extension for Kdb+ Kx is a Perl extension for Kdb+Alpha code. Create a wrapper around Kdb+ and Q in Perl using the C interface to Kdb+METHODSNew $k = Kx->new(name=>'local22', host=>'localhost', port=>2222);Create a new K object. Set the connection paramaters to conect to 'host' and 'port' as specified.No connection is made to the server until you call $k->connect()If you don't define a name it defaults to 'default'. Each subsequent call to new() will use the same 'default' connection.So once you make a connection later calls to new() with the same name will use the same connection without further connect() calls required. $k = new K host=>'localhost', port=>2222; $k->connect(); # defaults to default; # picks up previous default connection to localhost port 2222 and # will use it as well. $k1 = new K;ConnectTo connect to the 'default' server. unless($k->connect()) { warn "Can't connect to Kdb+ servern"; }To connect to a defined server say 'local22' unless($k->connect('local22')) { warn "Can't connect to local22 Kdb+ servern"; }EnvironmentThere are a number of environment details you can glean from the Kdb+ server you are connected to. They are: my $arrayref = $k->tables; # The tables defined my $arrayref = $k->funcs; # The functions defined my $arrayref = $k->views; # The views defined my $arrayref = $k->variables; # The variables defined my $arrayref = $k->memory; # The memory details w my $dir = $k->cwd; # The current working directory my $dir = $k->chdir($newdir); # Set the cwd my $num = $k->GMToffset; # Offset from GMT for timesIf you make changes that effects these environmental details then call the env() method to update what is known. This module doesn't continually hassle the server for these details. @details = $k->env; # Get the environment from the server $details => $details => $details => $details => $details => 'GMToffset' $details => 'releasedate' $details => 'gmt' $details => 'localtime' $details => $details => 'cwd'You can also execute OS commands on the server end and gather the results like this. $arref = $k->oscmd("ls -l /");Requirements:· Perl Requirements: · Perl


Kx Related Software