Class: PgCtrl::Database

Inherits:
RDBMSObject show all
Defined in:
lib/pg_ctrl/db.rb

Instance Attribute Summary collapse

Attributes inherited from RDBMSObject

#name, #oid, #owner, #rdbms

Instance Method Summary collapse

Methods inherited from RDBMSObject

#to_s

Methods included from Utils

#set_opts

Constructor Details

#initialize(rdbms, oid, name, owner, opts = {}) ⇒ Database

Returns a new instance of Database.



36
37
38
39
40
# File 'lib/pg_ctrl/db.rb', line 36

def initialize(rdbms, oid, name, owner, opts = {}) 
  super(rdbms, oid, name, owner)
  set_opts(opts, :encoding, :lc_collate, :lc_ctype, :is_template,
      :can_connect, :acl)
end

Instance Attribute Details

#aclObject (readonly)

Returns the value of attribute acl.



35
36
37
# File 'lib/pg_ctrl/db.rb', line 35

def acl
  @acl
end

#encodingObject (readonly)

Returns the value of attribute encoding.



30
31
32
# File 'lib/pg_ctrl/db.rb', line 30

def encoding
  @encoding
end

#lc_collateObject (readonly)

Returns the value of attribute lc_collate.



31
32
33
# File 'lib/pg_ctrl/db.rb', line 31

def lc_collate
  @lc_collate
end

#lc_ctypeObject (readonly)

Returns the value of attribute lc_ctype.



32
33
34
# File 'lib/pg_ctrl/db.rb', line 32

def lc_ctype
  @lc_ctype
end

Instance Method Details

#can_connect?Boolean

Returns:

  • (Boolean)


34
# File 'lib/pg_ctrl/db.rb', line 34

def can_connect?() @can_connect end

#template?Boolean

Returns:

  • (Boolean)


33
# File 'lib/pg_ctrl/db.rb', line 33

def template?() @is_template end