aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v6/sysenv.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v6/sysenv.rb')
-rw-r--r--lib/sisu/v6/sysenv.rb21
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/sisu/v6/sysenv.rb b/lib/sisu/v6/sysenv.rb
index 8c819d9b..a8879e7a 100644
--- a/lib/sisu/v6/sysenv.rb
+++ b/lib/sisu/v6/sysenv.rb
@@ -249,7 +249,9 @@ module SiSU_Env
$:.each do |reqpath|
if FileTest.exist?("#{reqpath}/#{@prog}.rb")
load_prog=true
+ #SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).ok("#{reqpath}/#{@prog}.rb loaded")
break
+ #else SiSU_Utils::CodeMarker.new(__LINE__,__FILE__,:fuchsia).warn("#{reqpath}/#{@prog}.rb not found")
end
end
if load_prog \
@@ -4428,6 +4430,9 @@ WOK
: ''
end
def dbi
+ PG::Connection.open(:dbname => psql.db)
+ end
+ def dbi_
(psql.host =~/(?:\S{1,3}\.){3}\S{1,3}|\S+?\.\S+/) \
? "DBI:Pg:database=#{psql.db};host=#{psql.host};port=#{psql.port}"
: "DBI:Pg:database=#{psql.db};port=#{psql.port}"
@@ -4435,19 +4440,11 @@ WOK
def conn_dbi
DBI.connect(psql.dbi,psql.user,psql.db)
end
- self
- end
- def mysql
- def db
- #"#{Db[:name_prefix]}#{@pwd_stub}"
- end
- def port
- '**'
+ def conn_pg
+ require 'pg'
+ PG::Connection.new(dbname: psql.db, port: psql.port)
end
- def dbi
- "dbi:Mysql:database=#{mysql.db};port=#{mysql.port}"
- end
- self
+ self
end
def sqlite
def db