module GemStone

Constants

OOP_CLASS_STRING
OOP_NIL
VERSION

Public Class Methods

executeString(string) click to toggle source
# File lib/gemstone_ruby/base.rb, line 53
def GemStone.executeString(string)
  oopValue = GemStone.GciExecuteStr(string, OOP_NIL)
  oop = OopType.new(oopValue)
  if oop.isNil;          return nil;      end
  if oop.isTrue;         return true;     end
  if oop.isFalse;        return false;    end
  if oop.isCharacter;    return oop.to_s; end
  if oop.isSmallDouble;  return oop.to_f; end
  if oop.isSmallInteger; return oop.to_i; end
  if oop.isString;    return oop.to_s;    end
  return oop
end
gciError() click to toggle source
# File lib/gemstone_ruby/base.rb, line 66
def GemStone.gciError()
  gciError = GemStone::GciErrSType.new
  haveErrorFlag = GemStone.GciErr(gciError)
  return haveErrorFlag ? gciError : nil
end
login(options={}) click to toggle source
# File lib/gemstone_ruby/base.rb, line 40
def GemStone.login(options={})
  options[:stone]    ||= "gs64stone"
  options[:gemnet]   ||= "!tcp@localhost#netldi:gs64ldi#task!gemnetobject"
  options[:user]     ||= "DataCurator"
  options[:password] ||= "swordfish"
  GemStone.GciSetNet(options[:stone], nil, nil, options[:gemnet])
  if (!GemStone.GciLogin(options[:user], options[:password]))
    raise GemStone.gciError()[:message]
  end
  return GciGetSessionId()  
end