From nobody at rubyforge.org Fri Oct 17 08:00:48 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Fri, 17 Oct 2008 08:00:48 -0400 (EDT) Subject: [ruby-oci8-commit] [291] web/hiki_src: Add customization as follows to hiki 0.8.7. Message-ID: <20081017120048.77DDC18581A9@rubyforge.org> Revision: 291 Author: kubo Date: 2008-10-17 08:00:47 -0400 (Fri, 17 Oct 2008) Log Message: ----------- Add customization as follows to hiki 0.8.7. 1. It makes links for static pages when it is accessed by wget. 2. If a heading title looks like a function call, it add an anchor by the function name. e.g. !! logoff() -->

logoff()

3. If a wiki link has '#', it assumes the the left side is a wiki name and the right side is an anchor. e.g. [[OCI8#logoff]] --> OCI8#logoff Modified Paths: -------------- web/hiki_src/misc/plugin/google-sitemaps.rb web/hiki_src/style/default/html_formatter.rb Added Paths: ----------- web/hiki_src/plugin/99ruby-oci8.rb Modified: web/hiki_src/misc/plugin/google-sitemaps.rb =================================================================== --- web/hiki_src/misc/plugin/google-sitemaps.rb 2008-10-16 13:59:41 UTC (rev 290) +++ web/hiki_src/misc/plugin/google-sitemaps.rb 2008-10-17 12:00:47 UTC (rev 291) @@ -7,15 +7,21 @@ sitemaps = %Q!\n! sitemaps << %Q!\n! site_last_modified = nil + is_wget = /wget/i =~ ENV['HTTP_USER_AGENT'] @db.page_info.each do |page| name = page.keys[0] lastmod = page.values[0][:last_modified] if site_last_modified.nil? or site_last_modified < lastmod site_last_modified = lastmod end + if is_wget + link = "#{@conf.base_url}#{name.escape}.html" + else + link = "#{@conf.index_url}?#{name.escape}" + end sitemaps << <<_E - #{@conf.index_url}?#{name.escape} + #{link} #{lastmod.utc.strftime('%Y-%m-%dT%H:%M:%S+00:00')} _E Added: web/hiki_src/plugin/99ruby-oci8.rb =================================================================== --- web/hiki_src/plugin/99ruby-oci8.rb (rev 0) +++ web/hiki_src/plugin/99ruby-oci8.rb 2008-10-17 12:00:47 UTC (rev 291) @@ -0,0 +1,71 @@ + +def wget? + /wget/i =~ ENV['HTTP_USER_AGENT'] +end + +alias :orig_hiki_url :hiki_url + +def hiki_url(page) + if wget? + "#{page.escape}.html" + else + orig_hiki_url(page) + end +end + +alias :orig_hiki_anchor :hiki_anchor + +def hiki_anchor( page, display_text ) + if /^(\w+)\(.*\)$/ =~ display_text + display_text = %Q!#{display_text}! + end + if wget? + if /(\w+)(#\w+)/ =~ page + page = $1 + anchor = $2 + else + anchor = '' + end + if page == 'FrontPage' then + make_anchor("index.html#{anchor}", display_text) + else + make_anchor("#{page.escape}.html#{anchor}", display_text) + end + else + orig_hiki_anchor(page, display_text) + end +end + +alias :orig_create_menu :create_menu + +def create_menu(data, command) + if wget? + [] + else + orig_create_menu(data, command) + end +end + +alias :orig_editable? :editable? + +def editable?( page = @page ) + if wget? + false + else + orig_editable?(page) + end +end + +def logo + '' +end + +def link_to_japanese + 'Japanese' +end + +def link_to_english + 'English' +end + +export_plugin_methods(:logo, :link_to_japanese, :link_to_english) Modified: web/hiki_src/style/default/html_formatter.rb =================================================================== --- web/hiki_src/style/default/html_formatter.rb 2008-10-16 13:59:41 UTC (rev 290) +++ web/hiki_src/style/default/html_formatter.rb 2008-10-17 12:00:47 UTC (rev 291) @@ -28,6 +28,20 @@ s = replace_wikiname( s ) if @conf.use_wikiname s = replace_link( s ) s = replace_auto_link( s ) if @conf.auto_link + s = s.gsub(%r!(.*?)!) do |m| + level = $1 + title = $2 + case title + when /^(?:[A-Z][\w:]+\.)?([a-z0-9_]+)\(.*?\)$/ + %Q!#{title}! + when /^([a-z_]+)\s*=.*$/ + %Q!#{title}! + when /^[a-z_]+$/ + %Q!#{title}! + else + m + end + end s = replace_heading( s ) s = replace_plugin( s ) if @conf.use_plugin @html_converted = s @@ -132,11 +146,12 @@ @plugin.make_anchor(u, k, 'external') else u = u.unescapeHTML + u, anchor = $1, $2 if /([\w:]+)(#\w+)/ =~ u u = @aliaswiki.aliaswiki_names.key( u ) || u # alias wiki if /(.*)(#l\d+)\z/ =~ u u, anchor = $1, $2 else - anchor = '' + anchor ||= '' end if @db.exist?( u ) # page name k = @plugin.page_name( k ) if k == u From nobody at rubyforge.org Sat Oct 18 03:17:35 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sat, 18 Oct 2008 03:17:35 -0400 (EDT) Subject: [ruby-oci8-commit] [292] web: * doc_root/*: add document root of hiki pages. Message-ID: <20081018071735.77C9E18582B4@rubyforge.org> Revision: 292 Author: kubo Date: 2008-10-18 03:17:34 -0400 (Sat, 18 Oct 2008) Log Message: ----------- * doc_root/*: add document root of hiki pages. * hiki_data/*: add data directories of hiki pages. * hiki_src/hiki.cgi: change $KCODE from 'e'(EUC-JP) to 'u'(UTF-8). * hiki_src/hiki/storage.rb: check the timestamp of page files and cache files. Modified Paths: -------------- web/hiki_src/hiki/storage.rb web/hiki_src/hiki.cgi Added Paths: ----------- web/ChangeLog web/doc_root/ web/doc_root/css/ web/doc_root/css/ruby-oci8.css web/doc_root/en/ web/doc_root/en/.htaccess web/doc_root/en/hiki.cgi web/doc_root/en/hikiconf.rb web/doc_root/hiki_base.css web/doc_root/index.html web/doc_root/ja/ web/doc_root/ja/.htaccess web/doc_root/ja/hiki.cgi web/doc_root/ja/hikiconf.rb web/hiki_data/ web/hiki_data/en/ web/hiki_data/en/backup/ web/hiki_data/en/cache/ web/hiki_data/en/cache/parser/ web/hiki_data/en/hiki.conf web/hiki_data/en/info.db web/hiki_data/en/session/ web/hiki_data/en/text/ web/hiki_data/en/text/APIReference web/hiki_data/en/text/FAQ web/hiki_data/en/text/FAQ_long_or_long_raw web/hiki_data/en/text/FAQ_plsql_out_param web/hiki_data/en/text/FAQ_uninstall web/hiki_data/en/text/FrontPage web/hiki_data/en/text/HowToInstall web/hiki_data/en/text/InstallBinaryPackage web/hiki_data/en/text/InstallForFullClient web/hiki_data/en/text/InstallForInstantClient web/hiki_data/en/text/InterWikiName web/hiki_data/en/text/PlatformSpecificIssue web/hiki_data/en/text/ReportInstallProblem web/hiki_data/en/text/SideMenu web/hiki_data/en/text/api web/hiki_data/en/text/api_OCI8 web/hiki_data/en/text/api_OCI8BFILE web/hiki_data/en/text/api_OCI8BLOB web/hiki_data/en/text/api_OCI8CLOB web/hiki_data/en/text/api_OCI8Cursor web/hiki_data/en/text/api_OCI8MetadataColumn web/hiki_data/en/text/api_OCI8MetadataTable web/hiki_data/en/text/api_OCI8MetadataView web/hiki_data/en/text/dbd_oci8 web/hiki_data/en/text/dev_APIWrap web/hiki_data/en/text/dev_CodingStyle web/hiki_data/en/text/dev_SourceCode web/hiki_data/ja/ web/hiki_data/ja/backup/ web/hiki_data/ja/cache/ web/hiki_data/ja/cache/parser/ web/hiki_data/ja/hiki.conf web/hiki_data/ja/info.db web/hiki_data/ja/session/ web/hiki_data/ja/text/ web/hiki_data/ja/text/APIReference web/hiki_data/ja/text/FAQ web/hiki_data/ja/text/FAQ_long_or_long_raw web/hiki_data/ja/text/FAQ_plsql_out_param web/hiki_data/ja/text/FAQ_uninstall web/hiki_data/ja/text/FrontPage web/hiki_data/ja/text/HowToInstall web/hiki_data/ja/text/InstallBinaryPackage web/hiki_data/ja/text/InstallForFullClient web/hiki_data/ja/text/InstallForInstantClient web/hiki_data/ja/text/InterWikiName web/hiki_data/ja/text/PlatformSpecificIssue web/hiki_data/ja/text/ReportInstallProblem web/hiki_data/ja/text/SideMenu web/hiki_data/ja/text/api web/hiki_data/ja/text/api_OCI8 web/hiki_data/ja/text/api_OCI8BFILE web/hiki_data/ja/text/api_OCI8BLOB web/hiki_data/ja/text/api_OCI8CLOB web/hiki_data/ja/text/api_OCI8Cursor web/hiki_data/ja/text/api_OCI8MetadataColumn web/hiki_data/ja/text/api_OCI8MetadataTable web/hiki_data/ja/text/api_OCI8MetadataView web/hiki_data/ja/text/dbd_oci8 Added: web/ChangeLog =================================================================== --- web/ChangeLog (rev 0) +++ web/ChangeLog 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,26 @@ +2008-10-18 KUBO Takehiro + * doc_root/*: add document root of hiki pages. + * hiki_data/*: add data directories of hiki pages. + * hiki_src/hiki.cgi: change $KCODE from 'e'(EUC-JP) to 'u'(UTF-8). + * hiki_src/hiki/storage.rb: check the timestamp of page files + and cache files. + +2008-10-17 KUBO Takehiro + * hiki_src/*: add customization as follows to hiki 0.8.7. + 1. It makes links for static pages when it is accessed + by wget. + 2. If a heading title looks like a function call, it + add an anchor by the function name. + e.g. + !! logoff() + --> +

logoff()

+ 3. If a wiki link has '#', it assumes the the left side + is a wiki name and the right side is an anchor. + e.g. + [[OCI8#logoff]] + --> + OCI8#logoff + +2008-10-16 KUBO Takehiro + * hiki_src/*: Hiki 0.8.7, a wiki clone written by ruby, is added. Added: web/doc_root/css/ruby-oci8.css =================================================================== --- web/doc_root/css/ruby-oci8.css (rev 0) +++ web/doc_root/css/ruby-oci8.css 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,666 @@ +/* +Title: Hiki +$Revision: 1.10 $ +Author: TAKEUCHI Hitoshi +Access: hitoshi at namaraii.com +License: GPL +Comment: Hiki default theme + +based on tDiary's clover theme. +Thanks to original theme authors TADA Tadashi and NT. + +Copyright 2002 (C) by TADA Tadashi +Copyright 2002 (C) by NT +Copyright 2004 (C) by TAKEUCHI Hitoshi +validated by W3C. +*/ +/* ChangeLog +2004-01-23 TAKEUCHI Hitoshi + * modified for Hiki + +2002-09-14 NT + * convert for 1.5 series. + +2002-05-07 TADA Tadashi + * remove overflow from pre. + * line-height of body upto 150%. + +2002-03-28 TADA Tadashi + * image color down to 7bit. + * no underline for links. + +2002-03-28 TADA Tadashi + * support new amazon plugin. + +2002-03-27 TADA Tadashi + * fix textarea biyo--n problem. +*/ + +body { + background-color: #fff; + color: #000; + font-family: Arial,Verdana,Helvetica,'MS UI Gothic',sans-serif; + margin: 0; + padding: 0.5em; + padding-right: 1em; +} + +a{ + text-decoration: none; +} + +a:link { + color: #22a; +} + +a:visited { + color: #561464; +} + +a:hover { + text-decoration: underline; +} + +div.adminmenu { + text-align: right; + margin-top: 0px; + padding: 0.2em 0.5em 0.5em 0.5em; + padding-right: 0; + font-size: 75%; + line-height: 2.5em; +} + +span.adminmenu { + background-color: #f0f0ff; + color: #ffffff; + border-color: #aaa; + border-style: solid; + border-width: 0px 1px 1px 0px; + padding: 2px; + white-space: nowrap; +} + +h1 { + height: 64px; + line-height: 64px; + text-align: right; + padding-bottom: 5px; +} + +h2 { + font-size: 160%; + border-style: solid; + border-color: #48c; + border-width: 0px 0px 1px 0px; +} + +div.day h2 { + font-size: 160%; + border-style: solid; + border-color: #48c; + border-width: 0px 0px 2px 0px; + margin-left: 0.5em; + padding-left: 0.5em; + padding-bottom: 4px; +} + +div.body { + margin-left: 1.8em; + line-height: 120%; +} + +div.body h3 { + font-size: 140%; + border-style: dashed; + border-color: #48c; + border-width: 0px 0px 2px 0px; + margin-top: 1.5em; + margin-bottom: 0.5em; + padding: 0 0 0.4em 0; +} + +div.body h4 h5 h6 { + margin-top: 1.5em; + margin-bottom: 0.5em; + padding: 4px; +} + +div.body h4 { + font-size: 140%; + border-left: solid 3px #48c; + padding: 0.2em 0.3em; +} +div.body h5 { + font-size: 140%; +} +div.body h6 { + font-size: 110%; +} + +div.body p { + margin-top: 0px; + margin-bottom: 0.5em; + color: #000; + background-color: transparent; + line-height: 150%; +} + +div.body pre { + color: #000; + background-color: #f0f0ff; + border-style: solid; + border-width: 1px 1px 1px 6px; + border-color: #cccccc; + padding: 8px; + margin-left: 2em; +} + +blockquote { + color: #000; + background-color: #f0f0ff; + border-style: solid; + border-color: #cccccc; + border-width: 2px 0px 2px 0px; + padding: 4px; + margin-left: 3em; + margin-right: 3em; +} + +div.body blockquote p { + margin-left: 0em; +} + +div.body li { + margin-left: 0.5em; +} + +div.body dl { + margin-left: 0.5em; +} + +div.body dt { + border-style: solid; + border-color: #eef; + border-width: 0px 0px 1px 0px; + margin-top: 0.7em; +} + +div.body dd { + margin-top: 0.3em; + margin-bottom: 0.5em; + margin-left: 2em; +} + +div.comment { + border-style: solid; + border-color: #ccc; + border-width: 1px; + color: #000; + background-color: #eef; + margin-top: 1em; + margin-bottom: 0.5em; + margin-left: 1em; + padding: 4px; + font-size: 90%; +} + +div.form div.comment { + margin-right: 1em; + color: #000; + background-color: #fff; +} + +div.comment p { + margin-top: 0px; + margin-bottom: 0.5em; +} + +div.comment p.commenttitle { + border-style: dashed; + border-color: #ccc; + border-width: 0px 0px 1px 0px; +} + + +div.form { + border-style: solid; + border-color: #c0c0c0; + border-width: 1px; + color: #000; + background-color: #f0f0ff; +} + +div.day div.form { + margin-top: 0px; + margin-bottom: 0.5em; + margin-left: 2em; +} + +div.form form { + margin: 0; + padding: 4px 4px 4px 4px; + width: 100%; +} + +div.form p { + margin-top: 0px; + margin-bottom: 0.5em; + padding-left: 4px; +} + +div.form textarea { + margin-left: 2em; +} + +div.referer { + text-align: right; + font-size: x-small; + margin-top: 0px; +} + +div.refererlist { + border-style: solid; + color: #000; + border-color: #c0c0c0; + border-width: 1px; + background-color: #f0f0ff; + margin-top: 0px; + margin-left: 2em; + margin-bottom: 0.5em; + font-size: small; +} + +div.refererlist ul { + margin-left: 2em; +} + +div.form div.refererlist { + margin-right: 1em; + color: #000; + background-color: #fff; +} + +div.refererlist p, div.refererlist ul { + margin-top: 0px; + margin-bottom: 0em; + padding: 4px 4px 4px 4px; +} + +hr { + margin-top: 0.5em; + border-style: solid; + border-width: 2px 0px 0px 0px; + border-color: #ccc; +} + +hr.sep { + display: none; +} + +div.footer { + text-align: right; + font-size: 80%; + color: #444; +} + +form div.body { + border-style: solid; + border-color: #c0c0c0; + border-width: 1px; + color: #000; + background-color: #f0f0ff; + padding: 0px 4px 4px 4px; +} + +table { + border-color: #ccc; + border-width: 1px; + padding: 0px; + border-collapse: collapse; +} +th, tr, td { + border-style: solid; + border-color: #ccc; + border-width: 1px; + padding-top: 4px; + padding-left: 4px; +} + +/* + for plugins + */ + +/* calendar */ +div.calendar { + font-size: x-small; +} + +/* calendar2 */ +table.calendar { + font-size: x-small; + line-height: 100%; + border-width: 0px; +} + +table.calendar td { + margin: 0px; + text-align: right; + padding: 0px; + margin: 0px; +} + +table.calendar td.calendar-prev-month, table.calendar td.calendar-current-month, table.calendar td.calendar-next-month { + text-align: center; +} + +/* recent_list */ +p.recentitem { + font-size: small; + margin-top: 0px; + margin-bottom: 0px; +} + +div.recentsubtitles { + font-size: x-small; + margin-top: 0px; + margin-bottom: 1em; + margin-left: 1em; +} + +/* footnote */ +div.body span.footnote { + vertical-align: super; + font-size: 80%; +} + +div.footnote { + border-style: solid; + border-color: #c0c0c0; + border-width: 1px 0px 0px 0px; + margin-left: 3em; + font-size: small; +} + +/* amazon plugin */ +img.left { + border-width: 1px; + border-color: #000080; + float: left; +} + +img.right { + border-width: 1px; + border-color: #000080; + float: right; +} + +/* similarity Plugin */ +.bulkfeedsSimilarity { + width: 500px; +} + +.bulkfeedsSimilarityHeader { + font-weight: bold; + background: #ccc; + padding: 0.2em; + margin-bottom: 0.2em; +} + +.bulkfeedsSimilarityHeader a { + font-weight: bold; + color: #000; +} + +.bulkfeedsSimilarityHeader a:visited { + color: #000; +} + +.bulkfeedsSimilarityItems { + margin: 0; + padding-left: 1em; + list-style: none; +} + +.bulkfeedsSimilarityFooter { + text-align: center; + margin-top: 0.5em; +} + +.bulkfeedsSimilarityFooter a { + color: #000; +} + +.bulkfeedsSimilarityFooter a:visited { + color: #000; +} + +.comments-head { + padding: 0.4em; + background: #ccc; +} + +.comments-head a { + font-weight: bold; + color: #000; +} + +.comments-head a:visited { + font-weight: bold; + color: #000; +} + +.comments-body { + padding: 0.5em; +} + +.comments-body p { + margin: 0.2em; +} + +.hilight { + color: black; + background: #ff6666; +} + +div.section { + clear: both; +} + +div.main { + margin-left: 20%; +} + +div.sidebar { + position: absolute; + top: 0px; + left: 0px; + width: 20%; + font-size: 75%; + padding: 2px 2px 100% 2px; + border-style: solid; + border-color: #c0c0c0; + border-width: 1px; + color: #000; + background-color: #f0f0ff; +} + +div.sidebar ul { + margin: 20px; + padding: 0px; +} + +div.sidebar form { + margin: 0em 0em 0.5em 0em; + padding: 0px; +} + + +/* +short tsukkomi body +*/ +div.commentshort { + font-size: 0.9em; + margin-left: 0.5em; +} + +span.commentator { + font-weight: bold; +} + +div.commentshort p { + margin-top: 0.5em; + margin-bottom: 0.2em; + line-height: 1.2em; +} + +/* +tsukkomi body +*/ +div.commentbody { + font-size: 0.9em; + margin: 0.5em; + line-height: 1.2em; +} + +/* +tsukkomi commentator +*/ +div.commentator { + line-height: 1.5em; +} + +/* +tsukkomi body +*/ +div.commentbody p { + margin: 0.5em; + margin-left: 2em; +} + +/* +form setting +*/ +div.form form { + margin: 0em 0em 0em 2em; +} + +div.form div.caption { + font-size: 0.9em; + margin: 0.5em; +} + +div.form form.comment { + font-size: 0.9em; +} + +div.field { + display: inline; + margin-right: 2em; +} + +form.comment input { + margin-left: 1em; +} + +div.textarea { + display: block; + vertical-align: top; +} + +form.comment textarea { + display: block; + margin-left: 3em; + width: 30em; + height: 5em; +} + +div.button { + display: block; + margin-left: 3em; +} + +/* +update form +*/ +form.update { + padding-top: 0.5em; + padding-bottom: 0.5em; +} + +form.update input, form.update textarea, form.commentstat input { +} + +form.update span.field { + display: inline; + margin-left: 0em; + margin-right: 0.5em; +} + +form.update div.field.title { + display: block; + margin-top: 1em; +} + +form.update div.field.title input { + margin-left: 0.5em; +} + +form.update div.textarea { + display: block; + margin-top: 1em; +} + +form.update textarea { + display: block; + margin-left: 3em; + margin-bottom: 1em; + width: 80%; + height: 15em; +} + +form.update span.checkbox.hidediary { + margin-left: 1em; +} + +/* +tsukkomi change-status form +*/ +div.comment form { + margin-top: 0em; +} + + at media print { + div.main { margin-left: 0%;} + div.adminmenu { display: none; } + div.sidebar { display: none; } + div.comment { display: none; } + div.footer { display: none; } + div.referer { display: none; } +} + + at media screen { + div.main { margin-left: 20%;} + div.adminmenu { display: block; } + div.sidebar { display: block; } + div.comment { display: block; } + div.footer { display: block; } + div.footer div { display: block; } + div.referer { display: block;} +} + +div.hello { + text-align: right; + font-size: 80%; + margin-top: 0px; +} + +/* + added by kubo for ruby-oci8. + */ +div.sidebar a.logo { + text-indent: 2em; + text-align: center; + color: red; + font-family: Impact,Chicago; + font-size: 350%; +} Added: web/doc_root/en/.htaccess =================================================================== --- web/doc_root/en/.htaccess (rev 0) +++ web/doc_root/en/.htaccess 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,11 @@ +Options +ExecCGI + +AddHandler cgi-script .cgi +DirectoryIndex hiki.cgi + + + deny from all + + +RewriteEngine on +RewriteRule ^(.+)\.html hiki.cgi?$1 [L] Added: web/doc_root/en/hiki.cgi =================================================================== --- web/doc_root/en/hiki.cgi (rev 0) +++ web/doc_root/en/hiki.cgi 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,5 @@ +#! /usr/bin/env ruby +hiki_dir = File.expand_path(File.dirname(__FILE__)) + '/../../hiki_src' + +$LOAD_PATH << hiki_dir +load hiki_dir + '/hiki.cgi' Property changes on: web/doc_root/en/hiki.cgi ___________________________________________________________________ Name: svn:executable + * Added: web/doc_root/en/hikiconf.rb =================================================================== --- web/doc_root/en/hikiconf.rb (rev 0) +++ web/doc_root/en/hikiconf.rb 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,126 @@ +# $Id: hikiconf.rb.sample.en,v 1.10 2006/07/03 01:19:13 fdiary Exp $ +# Copyright (C) 2002-2003 TAKEUCHI Hitoshi + +#================================= +# Items which must be changed. +#================================= + +lang = 'en' + +# Directory where data is stored (Necessary) +# The directory where page contents or update time etc is stored. +# It is recommended to specify where one can't access via WWW. +# All of files and directories in this directory must be writable by WWW server. + at data_path = File.dirname(__FILE__) + "/../../hiki_data/#{lang}" + +# Mail server (Optional) +# Specify name of the mail server. This may take effect when @mail_on_update is true. + at smtp_server = 'localhost' + +# Whether to use plugins (Optional) + at use_plugin = true + +#==================================================================== +# Settings which is modifiable from the administration menu. +# Modify if necessary. +# If you once change them from the administration menu, +# editing this file takes no effect. +#==================================================================== +# Site name +# Your side name. This is displayed in page title etc. + at site_name = 'hoge hoge' + +# Site administrator's name +# Site administrator's name. This is displayed in footer. + at author_name = 'anonymous' + +# Whether to mail on update +# If you set this true, the server @smtp_server sends mail to the address @mail +# when a page is updated. + at mail_on_update = false + +# Mail address where update information to be sent. +# Multiple addresses are available. + at mail = ['hoge at example.net'] + +# Theme +# Theme name. + at theme = 'hiki' +# URL of the theme. + at theme_url = 'theme' +# Path of the theme. + at theme_path = 'theme' + +# Sidebar +# Set this false when you use a theme which does not support sidebar. + at use_sidebar = true + +# CSS class name of the main area. + at main_class = 'main' + +# CSS class name of the sidebar. + at sidebar_class = 'sidebar' + +# Auto link +# Set this true if you'd like to link to existing pages automatically. + at auto_link = false + +# Whether to make WikiName link (Optional) + at use_wikiname = true + +# XML-RPC +# Whether to enable XML-RPC interfaces. + at xmlrpc_enabled = true + +#========================================= +# Items that can be changed. +#========================================= + +# The filename of CGI that is included in URI (Optional) + at cgi_name = 'hiki.cgi' + +# The base URL (Optional) +# The URL excepting the CGI name from the Hiki's one. +# (eg. If the hiki is placed on http://example.com/hiki/hiki.cgi, +# @base_url should be `http://example.com/hiki/'.) +# +# This is set automatically in most cases, but you should specify it +# when it works wrong (for example, in case of a reverse proxy.) + at base_url = "http://#{ENV['SERVER_NAME']}:#{ENV['SERVER_PORT']}/#{lang}/" + +# The cache directory (Optional) +# Specify the directory for cache used by plugins. +#@cache_path = "#{@data_path}/cache" + +# The template directory (Optional) +# Specify the directory where template files are in. +#@template_path = 'template' + +# Formatting Style (Optional) +# Specify style name if you'd like to use the style other than default. +# 'default' or 'rd+' is available now. +#@style = 'default' + +# `From' address of the update notification mail. (Optional) +#@mail_from = 'from at mail.address.hoge' + +# Keyword highlight (Optional) +#@hilight_keys = true + +# The charset of output (Optional) + at charset = 'utf-8' + +# Timeout second (Optional) +#@timeout = 30 + +# set this true when you debug plugins. +#@plugin_debug = false + + at options = {} # DO NOT MODIFY THIS LINE!! + +# Describe options passed to plugins. (Optional) +# Some plugins' behavior changes when options are passed. +# See the document of the plugin for details. +# +# Example: +# @options['amazon.aid'] = 'amazon-01' Added: web/doc_root/hiki_base.css =================================================================== --- web/doc_root/hiki_base.css (rev 0) +++ web/doc_root/hiki_base.css 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,35 @@ +ins.added { + font-weight: bold; +} + +del.deleted { + text-decoration: line-through; +} + +form.update textarea.keyword { + width: 15em; + height: 3em; +} + +/* 02help */ +div.helptlbr { + font-size: small; + padding: 1px; +} + +span.helpbttn { + border-style: solid; + border-width: 0px 0px 1px 0px; +} + + at media print{ + div.adminmenu{ + display: none; + } + div.main{ + margin-left: 0; + } + div.sidebar{ + display: none; + } +} Added: web/doc_root/index.html =================================================================== --- web/doc_root/index.html (rev 0) +++ web/doc_root/index.html 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,47 @@ + + + + + + + + ruby-oci8 - Top Page + + + + + + + +
+
+

Select Your Language

+
+
+ +
+
+
+ +
+
+ +
+ + + Added: web/doc_root/ja/.htaccess =================================================================== --- web/doc_root/ja/.htaccess (rev 0) +++ web/doc_root/ja/.htaccess 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,11 @@ +Options +ExecCGI + +AddHandler cgi-script .cgi +DirectoryIndex hiki.cgi + + + deny from all + + +RewriteEngine on +RewriteRule ^(.+)\.html hiki.cgi?$1 [L] Added: web/doc_root/ja/hiki.cgi =================================================================== --- web/doc_root/ja/hiki.cgi (rev 0) +++ web/doc_root/ja/hiki.cgi 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,5 @@ +#! /usr/bin/env ruby +hiki_dir = File.expand_path(File.dirname(__FILE__)) + '/../../hiki_src' + +$LOAD_PATH << hiki_dir +load hiki_dir + '/hiki.cgi' Property changes on: web/doc_root/ja/hiki.cgi ___________________________________________________________________ Name: svn:executable + * Added: web/doc_root/ja/hikiconf.rb =================================================================== --- web/doc_root/ja/hikiconf.rb (rev 0) +++ web/doc_root/ja/hikiconf.rb 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,126 @@ +# $Id: hikiconf.rb.sample.en,v 1.10 2006/07/03 01:19:13 fdiary Exp $ +# Copyright (C) 2002-2003 TAKEUCHI Hitoshi + +#================================= +# Items which must be changed. +#================================= + +lang = 'ja' + +# Directory where data is stored (Necessary) +# The directory where page contents or update time etc is stored. +# It is recommended to specify where one can't access via WWW. +# All of files and directories in this directory must be writable by WWW server. + at data_path = File.dirname(__FILE__) + "/../../hiki_data/#{lang}" + +# Mail server (Optional) +# Specify name of the mail server. This may take effect when @mail_on_update is true. + at smtp_server = 'localhost' + +# Whether to use plugins (Optional) + at use_plugin = true + +#==================================================================== +# Settings which is modifiable from the administration menu. +# Modify if necessary. +# If you once change them from the administration menu, +# editing this file takes no effect. +#==================================================================== +# Site name +# Your side name. This is displayed in page title etc. + at site_name = 'hoge hoge' + +# Site administrator's name +# Site administrator's name. This is displayed in footer. + at author_name = 'anonymous' + +# Whether to mail on update +# If you set this true, the server @smtp_server sends mail to the address @mail +# when a page is updated. + at mail_on_update = false + +# Mail address where update information to be sent. +# Multiple addresses are available. + at mail = ['hoge at example.net'] + +# Theme +# Theme name. + at theme = 'hiki' +# URL of the theme. + at theme_url = 'theme' +# Path of the theme. + at theme_path = 'theme' + +# Sidebar +# Set this false when you use a theme which does not support sidebar. + at use_sidebar = true + +# CSS class name of the main area. + at main_class = 'main' + +# CSS class name of the sidebar. + at sidebar_class = 'sidebar' + +# Auto link +# Set this true if you'd like to link to existing pages automatically. + at auto_link = false + +# Whether to make WikiName link (Optional) + at use_wikiname = true + +# XML-RPC +# Whether to enable XML-RPC interfaces. + at xmlrpc_enabled = true + +#========================================= +# Items that can be changed. +#========================================= + +# The filename of CGI that is included in URI (Optional) + at cgi_name = 'hiki.cgi' + +# The base URL (Optional) +# The URL excepting the CGI name from the Hiki's one. +# (eg. If the hiki is placed on http://example.com/hiki/hiki.cgi, +# @base_url should be `http://example.com/hiki/'.) +# +# This is set automatically in most cases, but you should specify it +# when it works wrong (for example, in case of a reverse proxy.) + at base_url = "http://#{ENV['SERVER_NAME']}:#{ENV['SERVER_PORT']}/#{lang}/" + +# The cache directory (Optional) +# Specify the directory for cache used by plugins. +#@cache_path = "#{@data_path}/cache" + +# The template directory (Optional) +# Specify the directory where template files are in. +#@template_path = 'template' + +# Formatting Style (Optional) +# Specify style name if you'd like to use the style other than default. +# 'default' or 'rd+' is available now. +#@style = 'default' + +# `From' address of the update notification mail. (Optional) +#@mail_from = 'from at mail.address.hoge' + +# Keyword highlight (Optional) +#@hilight_keys = true + +# The charset of output (Optional) + at charset = 'utf-8' + +# Timeout second (Optional) +#@timeout = 30 + +# set this true when you debug plugins. +#@plugin_debug = false + + at options = {} # DO NOT MODIFY THIS LINE!! + +# Describe options passed to plugins. (Optional) +# Some plugins' behavior changes when options are passed. +# See the document of the plugin for details. +# +# Example: +# @options['amazon.aid'] = 'amazon-01' Property changes on: web/hiki_data/en/backup ___________________________________________________________________ Name: svn:ignore + * Property changes on: web/hiki_data/en/cache/parser ___________________________________________________________________ Name: svn:ignore + * Added: web/hiki_data/en/hiki.conf =================================================================== --- web/hiki_data/en/hiki.conf (rev 0) +++ web/hiki_data/en/hiki.conf 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,50 @@ +# +# hiki configuration file via CGI $Revision: 1.5 $ +# + +# +# basic +# +site_name = "ruby-oci8" +author_name = "ruby-oci8 developers" +mail = [ +"hoge at example.net", +] +mail_on_update = false + +# +# password +# +password = "" + +# +# theme +# +theme = "hiki" +theme_url = "../css/ruby-oci8.css" +theme_path = "theme" +use_sidebar = true +main_class = "main" +sidebar_class = "sidebar" +auto_link = false +use_wikiname = false + +# +# options for plugins +# +options2 = { +"append-css.css" => "", +"sp.notselected" => "bbs.rb\nmath.rb\ncd.rb\nsearch.rb\nshow_plugins.rb\nrss.rb\nedit_user.rb\nisbn.rb\ntodo.rb\ncomment.rb\ndiffmail.rb\nhistory.rb\nappend-css.rb\nhighlight.rb\nsrc.rb\ncategory.rb\norphan.rb\nits.rb\ntrackback.rb\nnote.rb\nauth_typekey.rb\nquote_page.rb\nrbl.rb\nrss-show.rb\nfrozenmark.rb\nreferer.rb\nincremental_search.rb\npagerank.rb\nrank.rb\nrecent2.rb\nattach.rb\nentityref.rb\nfootnote.rb\ntemplate.rb\namazon.rb\nsitemap.rb\nsimilarity.rb\nreadlirs.rb\nkeyword.rb\n", +"sp.selected" => "google-sitemaps.rb\n", +"template.autoinsert" => true, +"template.default" => "InterWikiName", +"template.keyword" => nil, +"user.auth" => 0, +"user.list" => { +}, +} + +# +# XML-RPC interfaces +# +xmlrpc_enabled = true Added: web/hiki_data/en/info.db =================================================================== --- web/hiki_data/en/info.db (rev 0) +++ web/hiki_data/en/info.db 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,354 @@ +{ +"APIReference" => { +:count => 65, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169284974), +:references => [ +"api", +], +:title => "API Reference", +}, +"FAQ" => { +:count => 70, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169641718), +:references => [ +"FAQ_plsql_out_param", +"FAQ_long_or_long_raw", +"FAQ_uninstall", +], +:title => "FAQ", +}, +"FAQ_long_or_long_raw" => { +:count => 27, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169695583), +:references => [ +], +:title => "How can I use LONG or LONG RAW data?", +}, +"FAQ_plsql_out_param" => { +:count => 25, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169641653), +:references => [ +], +:title => "How can I get PL/SQL OUT parameters?", +}, +"FAQ_uninstall" => { +:count => 11, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169528599), +:references => [ +], +:title => "How to uninstall ruby-oci8", +}, +"FrontPage" => { +:count => 251, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1168180687), +:references => [ +"InstallForInstantClient", +], +:title => "Top Page", +}, +"HowToInstall" => { +:count => 99, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1168175222), +:references => [ +"InstallBinaryPackage", +"InstallForFullClient", +"InstallForInstantClient", +], +:title => "How to Install", +}, +"InstallBinaryPackage" => { +:count => 32, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1171256169), +:references => [ +], +:title => "Binary Package", +}, +"InstallForFullClient" => { +:count => 28, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1192083294), +:references => [ +"ReportInstallProblem", +], +:title => "Oracle Full Client", +}, +"InstallForInstantClient" => { +:count => 26, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1192083524), +:references => [ +"ReportInstallProblem", +], +:title => "Oracle Instant Client", +}, +"InterWikiName" => { +:count => 31, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169541634), +:references => [ +], +:title => "InterWikiName", +}, +"PlatformSpecificIssue" => { +:count => 60, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1192665604), +:references => [ +"InstallForInstantClient", +"InstallForFullClient", +], +:title => "Platform Specific Issues", +}, +"ReportInstallProblem" => { +:count => 52, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1168171962), +:references => [ +"PlatformSpecificIssue", +], +:title => "Report Install Problem", +}, +"SideMenu" => { +:count => 114, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1199075144), +:references => [ +"FrontPage", +"HowToInstall", +"InstallBinaryPackage", +"InstallForFullClient", +"InstallForInstantClient", +"ReportInstallProblem", +"PlatformSpecificIssue", +"APIReference", +"api", +"api_OCI8", +"api_OCI8Cursor", +"api_OCI8CLOB", +"api_OCI8BLOB", +"api_OCI8BFILE", +"api_OCI8MetadataTable", +"api_OCI8MetadataView", +"api_OCI8MetadataColumn", +"dbd_oci8", +"FAQ", +"dev_SourceCode", +"dev_CodingStyle", +"dev_APIWrap", +], +:title => "SideMenu", +}, +"api" => { +:count => 41, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195830265), +:references => [ +"api_OCI8", +"api_OCI8Cursor", +"api_OCI8CLOB", +"api_OCI8BLOB", +"api_OCI8BFILE", +"api_OCI8MetadataTable", +"api_OCI8MetadataView", +"api_OCI8MetadataColumn", +], +:title => "ruby-oci8 API", +}, +"api_OCI8" => { +:count => 59, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195981980), +:references => [ +"api_OCI8Cursor", +"api_OCI8MetadataTable", +"api_OCI8MetadataView", +"FAQ_long_or_long_raw", +], +:title => "OCI8", +}, +"api_OCI8BFILE" => { +:count => 28, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195824047), +:references => [ +], +:title => "OCI8::BFILE", +}, +"api_OCI8BLOB" => { +:count => 31, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195824014), +:references => [ +], +:title => "OCI8::BLOB", +}, +"api_OCI8CLOB" => { +:count => 31, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1196094116), +:references => [ +], +:title => "OCI8::CLOB", +}, +"api_OCI8Cursor" => { +:count => 45, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195829971), +:references => [ +"api_OCI8MetadataColumn", +], +:title => "OCI8::Cursor", +}, +"api_OCI8MetadataColumn" => { +:count => 0, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195981539), +:references => [ +"api_OCI8Cursor", +"api_OCI8MetadataTable", +"api_OCI8MetadataView", +], +:title => "OCI8::Metadata::Column", +}, +"api_OCI8MetadataTable" => { +:count => 0, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195981825), +:references => [ +"api_OCI8", +"api_OCI8MetadataColumn", +], +:title => "OCI8::Metadata::Table", +}, +"api_OCI8MetadataView" => { +:count => 0, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195981762), +:references => [ +"api_OCI8", +"api_OCI8MetadataColumn", +], +:title => "OCI8::Metadata::View", +}, +"dbd_oci8" => { +:count => 41, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195983779), +:references => [ +], +:title => "DBD::OCI8", +}, +"dev_APIWrap" => { +:count => 0, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1199075083), +:references => [ +], +:title => "API Wrap", +}, +"dev_CodingStyle" => { +:count => 0, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1198495154), +:references => [ +], +:title => "Coding Style", +}, +"dev_SourceCode" => { +:count => 0, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1198496693), +:references => [ +], +:title => "Source Code", +}, +} \ No newline at end of file Property changes on: web/hiki_data/en/session ___________________________________________________________________ Name: svn:ignore + * Added: web/hiki_data/en/text/APIReference =================================================================== --- web/hiki_data/en/text/APIReference (rev 0) +++ web/hiki_data/en/text/APIReference 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,35 @@ +! Available APIs + +You can use four APIs using and depending on ruby-oci8. +# ruby-oci8 native API +# ruby-dbi +# ActiveRecord +# Og (ObjectGraph) + +! ruby-oci8 native API + +This is a native API of ruby-oci8. +It consist of two layers. One is 'high-level API'. The other is 'low-level API'. Use the former for your application. The latter is not available on ruby-oci8 2.0.x, the developing version. + +* [[api]] +* [[ruby-oci8 low-level API|http://www.jiubao.org/ruby-oci8/manual.en.html]] (don't use this.) + +! ruby-dbi + +ruby-oci8 includes DBD::OCI8, DBD Driver for Oracle Database. You can use ruby-dbi API also. + +* [[DBD::OCI8|http://www.jiubao.org/ruby-oci8/dbd_oci8.en.html]] + +! ActiveRecord + +ActiveRecord is an ORM(object-relational mapping) library of [[Ruby on Rails|http://www.rubyonrails.org/]]. It includes Oracle support, which uses ruby-oci8. + +* [[Rails: Complete API|http://api.rubyonrails.org/]] +* [[Oracle on Rails Wiki|http://wiki.rubyonrails.com/rails/pages/Oracle]] + +! Og (ObjectGraph) + +Og (ObjectGraph) is an another ORM(object-relational mapping) library. +I don't know how to use it. :-< + +* [[http://www.nitroproject.org/]] Added: web/hiki_data/en/text/FAQ =================================================================== --- web/hiki_data/en/text/FAQ (rev 0) +++ web/hiki_data/en/text/FAQ 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,3 @@ +* [[FAQ_plsql_out_param]] +* [[FAQ_long_or_long_raw]] +* [[FAQ_uninstall]] Added: web/hiki_data/en/text/FAQ_long_or_long_raw =================================================================== --- web/hiki_data/en/text/FAQ_long_or_long_raw (rev 0) +++ web/hiki_data/en/text/FAQ_long_or_long_raw 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,35 @@ +{{toc}} + +! LONG + +!! Inserting and updating a LONG column +You have no need to do special thing. Just insert and update a value as a String. + +note: The maximum length is 65535 on 0.1.15 or earlier. It is 2G on 0.1.16 or later. + +!! Fetching a LONG column + +The maximum length is 65535 on 0.1.15 or eariler. +As for 0.0.16 and 1.0.x use OCI8#long_read_len to change the maximum length. + + # set the maximum data length + conn.long_read_len = 1024 * 1024 * 2 + +The maximum length is 2G on 2.0.x. It doesn't depend on long_read_len, which is an internal buffer size to fetch a LONG data. + +! LONG RAW + +!! Inserting and updating a LONG RAW column + +Explicitly bind the value as RAW. + filename = 'SagradaFamilia.gif' + image = open(filename, "rb").read() + cursor = conn.parse('insert into photos values(:1,:2)') + cursor.bind_param(1, filename)) + # bind image as RAW + cursor.bind_param(2, image, OCI8::RAW) + cursor.exec + +!! Fetching a LONG RAW column + +Just fetch a column. The maximum length limit is same with a LONG column. Added: web/hiki_data/en/text/FAQ_plsql_out_param =================================================================== --- web/hiki_data/en/text/FAQ_plsql_out_param (rev 0) +++ web/hiki_data/en/text/FAQ_plsql_out_param 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,86 @@ +{{toc}} + +! Package source for sample codes + CREATE OR REPLACE PACKAGE my_package IS + PROCEDURE my_proc(a1 IN number, a2 IN varchar2, b1 OUT number, b2 OUT varchar2); + END; + / + CREATE OR REPLACE PACKAGE BODY my_package IS + PROCEDURE my_proc(a1 IN number, a2 IN varchar2, b1 OUT number, b2 OUT varchar2) IS + BEGIN + b1 := a1 * 2; + b2 := UPPER(a2); + END; + END; + / + +! ruby-oci8 API +!! Explicitly bind parameters by their names + # use OCI8::Cursor#bind_param and OCI8::Cursor#exec + cursor = conn.parse('begin my_package.my_proc(:a1, :a2, :b1, :b2); end;') + cursor.bind_param(':a1', 123) + cursor.bind_param(':a2', 'abc') + # bind as a Fixnum. The value is NULL. + cursor.bind_param(':b1', nil, Fixnum) + # bind as a String. The max length is 20. The value is NULL. + cursor.bind_param(':b2', nil, String, 20) + cursor.exec() + # If you bind the parameter by name, use the name. + p cursor[':b1'] # => 246 + p cursor[':b2'] # => ABC + +!! Explicitly bind parameters by their positions + # use OCI8::Cursor#bind_param and OCI8::Cursor#exec + cursor = conn.parse('begin my_package.my_proc(:a1, :a2, :b1, :b2); end;') + cursor.bind_param(1, 123) + cursor.bind_param(2, 'abc') + cursor.bind_param(3, nil, Fixnum) + cursor.bind_param(4, nil, String, 20) + cursor.exec() + # If you bind the parameter by its position, use the position. + p cursor[3] # => 246 + p cursor[4] # => "ABC" + +!! Implicitly bind parameters + # use OCI8::Cursor#exec with bind parameters. + cursor = conn.parse('begin my_package.my_proc(:a1, :a2, :b1, :b2); end;') + cursor.exec(123, 'abc', [nil, Fixnum], [nil, String, 20]) + # The first argument is the bind value for the first position. + # The second is for the second. etc. + # If the value is a Array, the first element is the value to bind, + # the second is type, the third is the maximum length. + # They are bound by their position. + p cursor[3] # => 246 + p cursor[4] # => "ABC" + +!! Execute and get bind parameters at once. + # OCI8#exec with bind parameters + # It returns an array of all parameter values if the specified sql is a PL/SQL block. + params = conn.exec('begin my_package.my_proc(:a1, :a2, :b1, :b2); end;', + 123, 'abc', [nil, Fixnum], [nil, String, 20]) + p params[0] # => 123 + p params[1] # => "abc" + p params[2] # => 246 + p params[3] # => "ABC" + +! DBD::OCI8 +Ruby/DBI itself doesn't support OUT parameters. It is done +by a driver specific function. + sth = dbh.prepare('begin my_package.my_proc(?, ?, ?, ?); end;') + sth.bind_param(1, 123) + sth.bind_param(2, 'abc') + # Use nill with a type attribute to bind NULL value. + sth.bind_param(3, nil, {'type' => Fixnum}) + # But as for String it cannot because there is no + # way to set the maximum length. + sth.bind_param(4, ' ' * 20) + sth.execute + # call a driver specific function. + p sth.func(:bind_value, 3) # => 246 + p sth.func(:bind_value, 4) # => "ABC" + +! Rails (ActiveRecord) + +Get the raw connection and use it with ruby-oci8 API. + conn = ActiveRecord::Base.connection.raw_connection + ... Added: web/hiki_data/en/text/FAQ_uninstall =================================================================== --- web/hiki_data/en/text/FAQ_uninstall (rev 0) +++ web/hiki_data/en/text/FAQ_uninstall 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,10 @@ +Delete the following three files. +* oci8.rb +* oci8lib.so +* DBD/OCI8/OCI8.rb + +''oci8.rb'' and ''DBD/OCI8/OCI8.rb'' are in sitelib directory: + ruby -r rbconfig -e "puts Config::CONFIG['sitelibdir']" + +''oci8lib.so'' is in sitearch directory: + ruby -r rbconfig -e "puts Config::CONFIG['sitearchdir']" Added: web/hiki_data/en/text/FrontPage =================================================================== --- web/hiki_data/en/text/FrontPage (rev 0) +++ web/hiki_data/en/text/FrontPage 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,12 @@ +! What is ruby-oci8 + +ruby-oci8 is a ruby interface for [[Oracle Database]]. This is available with Oracle8, Oracle8i, Oracle9i, Oracle10g, [[Oracle XE]] and [[Oracle Instant Client]] + +ruby-oci8-1.0 is stable version. ruby-oci8-2.0-unstable is in development. +Don't use 2.0-unstable for your projects. + +As for Oracle7, use [[Oracle7 Module for Ruby]] by Yoshida Masato. + +! Sample one-liner +connect to scott/tiger, select emp and print as CSV format. + ruby -r oci8 -e "OCI8.new('scott', 'tiger').exec('select * from emp') do |r| puts r.join(','); end" Added: web/hiki_data/en/text/HowToInstall =================================================================== --- web/hiki_data/en/text/HowToInstall (rev 0) +++ web/hiki_data/en/text/HowToInstall 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,5 @@ +For Windows users, it is the best to install binary package. +* [[InstallBinaryPackage]] (Windows only) +To install from source code, it depends on what type of Oracle client do you use. +* [[InstallForFullClient]] +* [[InstallForInstantClient]] Added: web/hiki_data/en/text/InstallBinaryPackage =================================================================== --- web/hiki_data/en/text/InstallBinaryPackage (rev 0) +++ web/hiki_data/en/text/InstallBinaryPackage 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,13 @@ +! 1. Check the Oracle client version. + +Binary packages are available only for Oracle 8.1.5 or later. + +! 2. Download + +Download '''ruby-oci8-VERSION-mswin32.rb''' from +[[rubyforge|http://rubyforge.org/frs/?group_id=256]]. + +note: 1.0 is stable version. 2.0-unstable is in development. + +! 3. Run the package. + C:> ruby ruby-oci8-VERSION-mswin32.rb Added: web/hiki_data/en/text/InstallForFullClient =================================================================== --- web/hiki_data/en/text/InstallForFullClient (rev 0) +++ web/hiki_data/en/text/InstallForFullClient 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,81 @@ +! 1. Download source code + +Download '''ruby-oci8-VERSION.tar.gz''' from +[[rubyforge|http://rubyforge.org/frs/?group_id=256]]. + +note: 1.0 is stable version. 2.0-unstable is in development. + +! 2. Check whether '''ruby''' is in PATH. + +!! UNIX + $ ruby -v + ruby 1.8.5 (2006-08-25) [i486-linux] + +!! Windows + C:\> ruby -v + ruby 1.8.5 (2006-08-25) [i386-mswin32] + +! 3. Check whether '''make''' is in PATH. + +!! UNIX or Windows(cygwin, mingw32) + $ which make + +!! Windows(mswin32) + C:\> nmake /? +If it cannot be found, run vcvars32.bat and check it again. + C:\> C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat + C:\> nmake /? + +! 4. Check whether '''sqlplus''' runs correctly. + +!! UNIX + $ sqlplus USERNAME/PASSWORD + +!! Windows + C:\> sqlplus USERNAME/PASSWORD + +! 5. Check library search path. + +!! UNIX + +Set your OS's library search path to point to $ORACLE_HOME/lib. +If the database is 64-bit and the ruby is 32-bit, use $ORACLE_HOME/lib32 +instead. + +||!OS||!Environment Variable Name|| +||Linux||LD_LIBRARY_PATH|| +||Solaris 32-bit ruby||LD_LIBRARY_PATH_32 or LD_LIBRARY_PATH|| +||Solaris 64-bit ruby||LD_LIBRARY_PATH_64 or LD_LIBRARY_PATH|| +||HP-UX PA-RISC 32-bit ruby||SHLIB_PATH|| +||HP-UX PA-RISC 64-bit ruby||LD_LIBRARY_PATH|| +||HP-UX IA64||LD_LIBRARY_PATH|| +||Mac OS X||DYLD_LIBRARY_PATH|| +||AIX||LIBPATH|| + +Do not forget to export the variable. + $ LD_LIBRARY_PATH=$ORACLE_HOME/lib + $ export LD_LIBRARY_PATH + +!! Windows +If sqlplus runs correctly, library search path has no problem. + +! 6. make and install + +If you have a problem, [[report me|ReportInstallProblem]]. + +!! UNIX or Windows(cygwin, mingw32) + + gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf - + cd ruby-oci8-VERSION + make + make install + +note: If you use '''sudo''', use it only when running 'make install'. +sudo doesn't pass library search path to the executing command for security reasons. + +!! Windows(mswin32) + + gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf - + cd ruby-oci8-VERSION + nmake + nmake install Added: web/hiki_data/en/text/InstallForInstantClient =================================================================== --- web/hiki_data/en/text/InstallForInstantClient (rev 0) +++ web/hiki_data/en/text/InstallForInstantClient 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,109 @@ +! 1. Download source code + +Download '''ruby-oci8-VERSION.tar.gz''' from +[[rubyforge|http://rubyforge.org/frs/?group_id=256]]. + +note: 1.0 is stable version. 2.0-unstable is in development. + +! 2. Donwload Instant Client Packages. + +Download at least two packages +"Instant Client Package - '''Basic'''" and "Instant Client Package - '''SDK'''" +from [[Oracle Technology Network|http://www.oracle.com/technology/tech/oci/instantclient/index.html]]. + +note: use 32-bit packages for 32-bit ruby even though the OS is 64-bit. + +! 3. install Oracle Instant Client Packages. + +!! UNIX zip packages + + mkdir /opt + mkdir /opt/oracle + cd /opt/oracle + unzip path/to/instantclient-basic-OS-VERSION.zip + unzip path/to/instantclient-sdk-OS-VERSION.zip + +!! Linux rpm packages + + rpm -i path/to/oracle-instantclient-basic-VERSION-ARCH.rpm + rpm -i path/to/oracle-instantclient-devel-VERSION-ARCH.rpm + +!! Windows + + C: + mkdir C:\oracle + cd c:\oracle + unzip path/to/instantclient-basic-OS-VERSION.zip + unzip path/to/instantclient-sdk-OS-VERSION.zip + +! 4. check installed libraries. (UNIX zip packages only) + +!! UNIX + +If /opt/oracle/instantclient10_1/libclntsh.so is not found, make +a symbolic link to link the library. + + cd /opt/oracle/instantclient10_1 + ln -s libclntsh.so.10.1 libclntsh.so + +Note: +* use libclntsh.sl instead of libclntsh.so on HP-UX PA-RISC. +* use libclntsh.dylib instead of libclntsh.so on Mac OS X. +* skip this step for AIX. + +! 5. Set library search path. + +Set your OS's library search path to point to the installed location. + +||!OS||!Environment Variable Name|| +||Linux||LD_LIBRARY_PATH|| +||Solaris 32-bit ruby||LD_LIBRARY_PATH_32 or LD_LIBRARY_PATH|| +||Solaris 64-bit ruby||LD_LIBRARY_PATH_64 or LD_LIBRARY_PATH|| +||HP-UX PA-RISC 32-bit ruby||SHLIB_PATH|| +||HP-UX PA-RISC 64-bit ruby||LD_LIBRARY_PATH|| +||HP-UX IA64||LD_LIBRARY_PATH|| +||Mac OS X||DYLD_LIBRARY_PATH|| +||AIX||LIBPATH|| +||Windows||PATH|| + +!! UNIX zip packages + +For example: + $ LD_LIBRARY_PATH=/opt/oracle/instantclient_10_2 + $ export LD_LIBRARY_PATH + +!! Linux rpm packages + +For example: + $ LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.3/client/lib + $ export LD_LIBRARY_PATH + +!! Windows + +For example: + C:\> PATH=C:\oracle\instantclient_10_2;%PATH% + +! 6. make and install. + +If you have a problem, [[report me|ReportInstallProblem]]. + +!! UNIX or Windows(cygwin, mingw32) + + gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf - + cd ruby-oci8-VERSION + make + make install + +ruby-oci8 try to get the Instant Client location from library search path. + +note: If you use '''sudo''', use it only when running 'make install'. +sudo doesn't pass library search path to the executing command for security reasons. + +!! Windows(mswin32) + + gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf - + cd ruby-oci8-VERSION + nmake + nmake install + +ruby-oci8 try to get the Instant Client location from environment variable PATH. Added: web/hiki_data/en/text/InterWikiName =================================================================== --- web/hiki_data/en/text/InterWikiName (rev 0) +++ web/hiki_data/en/text/InterWikiName 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,5 @@ +* [[Oracle Database|http://www.oracle.com]] alias +* [[Oracle XE|http://www.oracle.com/technology/products/database/xe/index.html]] alias +* [[Oracle Instant Client|http://www.oracle.com/technology/tech/oci/instantclient/index.html]] alias +* [[Oracle7 Module for Ruby|http://www.yoshidam.net/Ruby.html#oracle]] alias +* [[YARV|http://www.atdot.net/yarv/]] alias Added: web/hiki_data/en/text/PlatformSpecificIssue =================================================================== --- web/hiki_data/en/text/PlatformSpecificIssue (rev 0) +++ web/hiki_data/en/text/PlatformSpecificIssue 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,86 @@ +! Intel Mac + +Oracle hasn't provided intel mac binary yet. +[[Oracle Instant Client]] 10.1.0.3 is ppc. It doesn't work with intel ruby. + +There are two workarounds. +# compile ruby as ppc. (look at [[Raimonds Simanovskis's blog|http://blog.rayapps.com/2007/08/27/how-to-setup-ruby-and-oracle-client-on-intel-mac/]]) +# use [[ruby-odbc|http://www.ch-werner.de/rubyodbc/]] and a third party ODBC driver ([[Actual Technologies|http://www.actualtechnologies.com/]] or [[OpenLink Software|http://uda.openlinksw.com/]]). + +! Solaris + +You need a same compiler which is used to make ruby itself. + +There are two ruby packages. +# [[Sunfreeware.com|http://www.sunfreeware.com/]] +# [[Blastwave.org|http://www.blastwave.org/]] + +The former is compiled by gcc. The latter is compiled by +[[Sun Studio|http://developers.sun.com/sunstudio/]]. +The both compilers are freely available. + +If you use Blastwave.org's ruby and want not to install Sun Studio, +you can edit rbconfig.rb by your self. [[(look at here)|http://forum.textdrive.com/viewtopic.php?id=12630]] + +! Linux + +Use the same bit-width of libraries with ruby. For example, x86_64 instant client for x86_64 ruby and 32-bit instant client for 32-bit ruby. It depends on the ruby but not on the OS. As for full client, x86_64 ruby cannot use with 32-bit full client, but 32-bit ruby can use with 64-bit full client because 32-bit libraries are in $ORACLE_HOME/lib32. + +To check which type of ruby do you use: + file `which ruby` +note: '''`''' is a backquote. + +! FreeBSD + +There are two ways. +* use ruby and instantclient on linux emulator +* use oracle8-client port + +In the latter case, compile and install as follows. +* install oracle8-client + cd /usr/ports/databases/oracle8-client + make + make install +* set an environment variable ORACLE_HOME + export ORACLE_HOME=/usr/local/oracle8-client +* extract ruby-oci8 tarball and replace oraconf.rb. + tar xvfz ruby-oci8-1.0.0-rc3.tar.gz + cd ruby-oci8-1.0.0-rc3/ext/oci8 + mv oraconf.rb oraconf.rb.orig + wget http://ruby-oci8.rubyforge.org/svn/branches/ruby-oci8-1.0/ext/oci8/oraconf.rb + +The rest procedures are described at [[this page|InstallForFullClient]]. + +note: You have no need to set LD_LIBRARY_PATH because +Oracle libraries in oracle8-client port are static ones. + +Not all faculties are available. Some tests in 'make check' +are failed. Some tests cause busy loop. Check and use it +at your own risk. + +! HP-UX + +You need a ruby which is linked with ''libpthread'' and ''libcl''. + +Look at [[http://www.alfonsomartone.itb.it/xvpucf.html]] for more detail. + +! Windows + +On some machines whose disk I/O is busy or which uses a slow disk, you may get a following error. + Permission denied - conftest.exe + +Edit mkmf.rb for a workaround. + + def try_run(src, opt="") + if try_link0(src, opt) + xsystem("./conftest") + else + nil + end + ensure + # add the following one line. + sleep 1 if /mswin32|cygwin|mingw32|bccwin32/ =~ RUBYPLATFORM + rm_f "conftest*" + end + +See also: [[http://abstractplain.net/blog/?p=788]]. Added: web/hiki_data/en/text/ReportInstallProblem =================================================================== --- web/hiki_data/en/text/ReportInstallProblem (rev 0) +++ web/hiki_data/en/text/ReportInstallProblem 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,32 @@ +Post the following information to [[rubyforge help forum|http://rubyforge.org/forum/forum.php?forum_id=1078]] +or mail it to [[me|mailto:kubo at jiubao.org]]. + +note: Before reporting, check [[PlatformSpecificIssue]]. + +! last 100 lines of 'ext/oci8/mkmf.log'. + + tail -100 ext/oci8/mkmf.log + +! the results of the following commands: + ruby --version + ruby -r rbconfig -e "p Config::CONFIG['host']" + ruby -r rbconfig -e "p Config::CONFIG['CC']" + ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']" + ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']" + ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']" + ruby -r rbconfig -e "p Config::CONFIG['DLDLAGS']" + ruby -r rbconfig -e "p Config::CONFIG['LIBS']" + ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']" +!! if you use gcc: + gcc --print-prog-name=ld + gcc --print-prog-name=as +!! on platforms which can use both 32bit/64bit binaries: + file `which ruby` + file $ORACLE_HOME/bin/oracle # Full Client + file INSTANT_CLIENT_DIRECTORY/libclntsh.* # Instant Client + echo $LD_LIBRARY_PATH + echo $LIBPATH # AIX + echo $SHLIB_PATH # HP-UX PA-RISC 32-bit ruby + echo $DYLD_LIBRARY_PATH # Mac OS X + echo $LD_LIBRARY_PATH_32 # Solaris 32-bit ruby + echo $LD_LIBRARY_PATH_64 # Solaris 64-bit ruby Added: web/hiki_data/en/text/SideMenu =================================================================== --- web/hiki_data/en/text/SideMenu (rev 0) +++ web/hiki_data/en/text/SideMenu 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,36 @@ +{{logo}} +{{br}} +[ English | {{link_to_japanese}} ] + +'''This site is under construction.''' + +! Site Map + +!! [[FrontPage]] + +!! Install and Setup +* [[HowToInstall]] +** [[InstallBinaryPackage]] +** [[InstallForFullClient]] +** [[InstallForInstantClient]] +* [[ReportInstallProblem]] +* [[PlatformSpecificIssue]] +!! Usage +* [[APIReference]] +** [[api]] +*** [[api_OCI8]] +*** [[api_OCI8Cursor]] +*** [[api_OCI8CLOB]] +*** [[api_OCI8BLOB]] +*** [[api_OCI8BFILE]] +*** [[api_OCI8MetadataTable]] +*** [[api_OCI8MetadataView]] +*** [[api_OCI8MetadataColumn]] +** [[dbd_oci8]] + +* [[FAQ]] + +!! Note for Developers +* [[dev_SourceCode]] +* [[dev_CodingStyle]] +* [[dev_APIWrap]] Added: web/hiki_data/en/text/api =================================================================== --- web/hiki_data/en/text/api (rev 0) +++ web/hiki_data/en/text/api 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,8 @@ +* [[api_OCI8]] {{toc_here(api_OCI8)}} +* [[api_OCI8Cursor]] {{toc_here(api_OCI8Cursor)}} +* [[api_OCI8CLOB]] {{toc_here(api_OCI8CLOB)}} +* [[api_OCI8BLOB]] {{toc_here(api_OCI8BLOB)}} +* [[api_OCI8BFILE]] {{toc_here(api_OCI8BFILE)}} +* [[api_OCI8MetadataTable]] {{toc_here(api_OCI8MetadataTable)}} +* [[api_OCI8MetadataView]] {{toc_here(api_OCI8MetadataView)}} +* [[api_OCI8MetadataColumn]] {{toc_here(api_OCI8MetadataColumn)}} Added: web/hiki_data/en/text/api_OCI8 =================================================================== --- web/hiki_data/en/text/api_OCI8 (rev 0) +++ web/hiki_data/en/text/api_OCI8 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,162 @@ +This is a class representing a database connection, +which corresponds to java.sql.Connection of JDBC and +database handle $dbh of Perl/DBI. + +! Class Methods + +!! OCI8.new(userid, password, dbname = nil, privilege = nil) + +connect to Oracle by ''userid'' and ''password''. ''dbname'' is the connect +string of Net8. If you need DBA privilege, please set ''privilege'' +as :SYSDBA or :SYSOPER. +If the Oracle client is 10g or later, you can use "//hostname_or_ip:port_no/oracle_sid" as ''dbname''. + + # sqlplus scott/tiger + conn = OCI8.new("scott", "tiger") + + # sqlplus scott/tiger at orcl.world + conn = OCI8.new("scott", "tiger", "orcl.world") + + # sqlplus 'sys/change_on_install as sysdba' + conn = OCI8.new("sys", "change_on_install", nil, :SYSDBA) + + # sqlplus scott/tiger@//oracle_db.example.com/XE + conn = OCI8.new("scott", "tiger", "//oracle_db.example.com/XE") + +To connect to Oracle by OS authentication, use nil for userid and password +(new in 1.0.0-rc2.) + +! Instance Methods + +!! logoff() +disconnect from Oracle. Uncommitted transaction is rollbacked. + + conn = OCI8.new("scott", "tiger") + ... do something ... + conn.logoff + +!! exec(sql, *bindvars) +execute the sql statement. The type of return value depends on +the type of sql statement: select; insert, update and delete; +create, alter and drop; and PL/SQL. + +When ''bindvars'' are specified, they are bound as bind variables +before execution. + +In case of select statement with no block, it returns the +instance of [[OCI8::Cursor]]. + + conn = OCI8.new('scott', 'tiger') + cursor = conn.exec('SELECT * FROM emp') + while r = cursor.fetch() + puts r.join(',') + end + cursor.close + conn.logoff + +In case of select statement with a block, it acts as iterator and +returns the processed row counts. Fetched data is passed to the +block as array. NULL value becomes nil in ruby. + + conn = OCI8.new('scott', 'tiger') + num_rows = conn.exec('SELECT * FROM emp') do |r| + puts r.join(',') + end + puts num_rows.to_s + ' rows were processed.' + conn.logoff + +In case of insert, update or delete statement, it returns the +number of processed rows. + + conn = OCI8.new('scott', 'tiger') + num_rows = conn.exec('UPDATE emp SET sal = sal * 1.1') + puts num_rows.to_s + ' rows were updated.' + conn.logoff + +In case of create, alter or drop statement, it returns true. + + conn = OCI8.new('scott', 'tiger') + conn.exec('CREATE TABLE test (col1 CHAR(6))') + conn.logoff + +In case of PL/SQL statement, it returns the array of bind +variables. + + conn = OCI8.new('scott', 'tiger') + conn.exec("BEGIN :str := TO_CHAR(:num, 'FM0999'); END;", 'ABCD', 123) + # => ["0123", 123] + conn.logoff + +Above example uses two bind variables which names are '':str'' +and '':num''. These initial values are "the string whose width +is 4 and whose value is 'ABCD'" and "the number whose value is +123". This method returns the array of these bind variables, +which may modified by PL/SQL statement. The order of array is +same with that of bind variables. + +!! parse(sql) +create cursor, prepare to execute SQL statement and return the +instance of [[OCI8::Cursor]]. + +!! describe_table(table_name) +(new in 1.0.0 without 'rc') + +returns [[api_OCI8MetadataTable]] or [[api_OCI8MetadataView]]. +If the table_name is not found, an OCIError(ORA-04043) exception +is raised. + +!! commit() +commit the transaction. + + conn = OCI8.new("scott", "tiger") + conn.exec("UPDATE emp SET sal = sal * 1.1") # yahoo + conn.commit + conn.logoff + +!! rollback() +rollback the transaction. + + conn = OCI8.new("scott", "tiger") + conn.exec("UPDATE emp SET sal = sal * 0.9") # boos + conn.rollback + conn.logoff + +!! autocommit? +return the state of the autocommit mode. The default value is +false. If true, the transaction is committed automatically +whenever executing insert/update/delete statements. + +!! autocommit = boolean_value +change the status of the autocommit mode. + + conn = OCI8.new("scott", "tiger") + conn.autocommit = true + ... do something ... + conn.logoff + +!! long_read_len +get the internal size of a fetch buffer for LONG or LONG RAW datatype. The default value is 65535. +On ruby-oci8 1.0 it is the maximum fetch size. If the fetched value is longer than this value, it causes an error. +On ruby-oci8 2.0, it is the size of one piece to perform a piecewise fetch. +The piecewise fetch is performed internally. You have no need to care it. + +See also: [[FAQ_long_or_long_raw]] + +!! long_read_len = size +set the size of long_read_len. + +See also: [[FAQ_long_or_long_raw]] + +!! prefetch_rows = rows +change the prefetch rows size. This reduces network round trips +when fetching multiple rows. The default value is 1. + +!! non_blocking? +return the status of blocking/non-blocking mode. The default +value is false. It is blocking mode. + +!! non_blocking= boolean_value +Changes the status of blocking/non-blocking mode. + +!! break +cancels the OCI call performing in other thread. To use this, the connection must be non-blocking mode. Added: web/hiki_data/en/text/api_OCI8BFILE =================================================================== --- web/hiki_data/en/text/api_OCI8BFILE (rev 0) +++ web/hiki_data/en/text/api_OCI8BFILE 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,41 @@ +This is a lob locator to read/write binary data to/from BFILE column. +This instance is automatically generated by select statement. + +! Instance Methods + +!! exists? +!! dir_alias +!! dir_alias = name +!! filename +!! filename = name + +!! read(size = nil) +read at most size bytes from BFILE, or to the end of file if size is omitted. + + conn.exec("SELECT name, image FROM photo") do |name, image| + File.open(name, 'w') do |f| + f.write(image.read) + end + end + + +!! size +return the size of the BFILE. + +!! pos +return the current offset of the BFILE. + +!! pos = number +set the current offset of the BFILE. + +!! eof? +true if the current offset is at the end of the BFILE. + +!! tell +synonym for pos. + +!! seek(pos) +synonym for pos=. + +!! rewind +set the current offset to zero. Added: web/hiki_data/en/text/api_OCI8BLOB =================================================================== --- web/hiki_data/en/text/api_OCI8BLOB (rev 0) +++ web/hiki_data/en/text/api_OCI8BLOB 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,79 @@ +This is a lob locator to read/write binary data to/from BLOB column. +This instance is automatically generated by select statement. + +! Class Methods + +!! OCI8::BLOB.new(con, val) +(new in 1.0.0-rc2) + +create a temporary lob. "temporary" means "which is not stored to a database." You can store your data to a temporary lob and insert it to a table. + +! Instance Methods + +!! available? +check whether BLOB is available or not. +To use BLOB you need to insert EMPTY_BLOB() at first. + + conn.exec("CREATE TABLE photo (name VARCHAR2(50), image BLOB)") + conn.exec("INSERT INTO photo VALUES ('null-data', NULL)") + conn.exec("INSERT INTO photo VALUES ('empty-data', EMPTY_BLOB())") + conn.exec("SELECT name, image FROM photo") do |name, image| + case name + when 'null-data' + puts "#{name} => #{image.available?.to_s}" + # => false + when 'empty-data' + puts "#{name} => #{image.available?.to_s}" + # => true + end + end + +!! read(size = nil) +read at most size bytes from BLOB, or to the end of file if size is omitted. + + conn.exec("SELECT name, image FROM photo") do |name, image| + File.open(name, 'w') do |f| + f.write(image.read) + end + end + +!! write(string) +write the given string to BLOB. +If old data is longer than new data, resize by OCI8::BLOB#size. + + conn.exec("SELECT name, image FROM photo") do |name, image| + File.open(name, 'r') do |f| + image.write(f.read) + image.size = f.pos + end + end + +!! size +return the size of BLOB. + +!! size=(len) +set the size of BLOB. + +!! pos +return the current offset of BLOB. + +!! pos = number +set the current offset of BLOB. + +!! eof? +true if the current offset is at the end of the BLOB. + +!! chunk_size +return the chunk size of BLOB. + +!! truncate(len) +synonym for size=. + +!! tell +synonym for pos. + +!! seek(pos) +synonym for pos=. + +!! rewind +set the current offset to zero. Added: web/hiki_data/en/text/api_OCI8CLOB =================================================================== --- web/hiki_data/en/text/api_OCI8CLOB (rev 0) +++ web/hiki_data/en/text/api_OCI8CLOB 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,109 @@ +This is an I/O class to read/write character data to/from CLOB objects. +You can insert a CLOB object to a column and get the column data by a +select statement. + + con = OCI8.new('scott', 'tiger') + # create a table. + con.exec("CREATE TABLE novels (title VARCHAR2(30), contents CLOB)") + # insert a CLOB object. + con.exec("INSERT INTO novels(title, contents) values (:1, :2)", + 'a long tale', OCI8::CLOB.new(con, 'long long text ...')) + # select a CLOB object. + con.exec("select contents from novels where title = :1", + 'a long tale') do |row| + # row[0] is a CLOB object. + contents = row[0].read + end + +! Class Methods + +!! OCI8::CLOB.new(con, val) +(requires Oracle 8.1 or upper) (new in 1.0.0-rc2) + +create a temporary lob. "temporary" means "which is not stored to a database." You can store your data to a temporary lob and insert it to a table. + +! Instance Methods + +!! available? +check whether the CLOB object is available or not. +// To use CLOB you need to insert EMPTY_CLOB() at first. + + con.exec("CREATE TABLE novels (title VARCHAR2(30), contents CLOB)") + con.exec("INSERT INTO novels VALUES ('null-data', NULL)") + con.exec("INSERT INTO novels VALUES ('empty-data', EMPTY_CLOB())") + con.exec("SELECT title, contents FROM novels") do |title, contents| + case title + when 'null-data' + puts "#{title} => #{contents.available?.to_s}" + # => false + when 'empty-data' + puts "#{title} => #{contents.available?.to_s}" + # => true + end + end + +!! read(size = nil) +get characters from the CLOB object. The number of characters is at most the specified size. If the size is nil, it read until the end of the CLOB. + +note: the size is not counted by byte but by character. The returned value's number of bytes can be longer then the size if it contains multi-byte characters. + + # read CLOB data. + con.exec("SELECT title, contents FROM novels") do |title, contents| + File.open(title, 'w') do |f| + f.write(contents.read) + end + end + +!! write(string) +write the given string to CLOB. The return value is the number of written '''characters'''. +If old data is longer than new data, resize by OCI8::CLOB#size. + + # write to CLOB. + con.exec("SELECT title, contents FROM novels") do |title, clob| + File.open(title, 'r') do |f| + contents = f.read + num_chars = clob.write(contents) + clob.size = num_chars + end + end + +note: OCI8::CLOB#size is counted by characters. If the contents contain multibyte characters, the following code set incorrect clob size. + + # bad example + con.exec("SELECT title, contents FROM novels") do |title, clob| + File.open(title, 'r') do |f| + contents = f.read + clob.write(contents) + clob.size = contents.length # boo! + end + end + +!! size +return the number of characters in the CLOB. + +!! size=(len) +set the number of characters in the CLOB. + +!! pos +return the current offset of the CLOB in characters. + +!! pos = number +set the current offset of the CLOB in characters. + +!! eof? +true if the current offset is at the end of the CLOB. + +!! chunk_size +return the chunk size of CLOB. + +!! truncate(len) +synonym for size=. + +!! tell +synonym for pos. + +!! seek(pos) +synonym for pos=. + +!! rewind +set the current offset to zero. Added: web/hiki_data/en/text/api_OCI8Cursor =================================================================== --- web/hiki_data/en/text/api_OCI8Cursor (rev 0) +++ web/hiki_data/en/text/api_OCI8Cursor 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,186 @@ +The instance of this class corresponds to cursor in the term of +Oracle, which corresponds to java.sql.Statement of JDBC and statement +handle $sth of Perl/DBI. + +Don't create the instance by calling 'new' method. Please create it by +calling ''OCI8#exec'' or ''OCI8#parse''. + +! Instance Methods + +!! define(pos, type, length = nil) +explicitly indicate the date type of fetched value. run this +method within parse and exec. pos starts from 1. lentgh is used +when type is String. + + cursor = conn.parse("SELECT ename, hiredate FROM emp") + cursor.define(1, String, 20) # fetch the first column as String. + cursor.define(2, Time) # fetch the second column as Time. + cursor.exec() + +!! bind_param(key, val, type = nil, length = nil) +bind variables explicitly. + +When key is number, it binds by position, which starts from 1. +When key is string, it binds by the name of placeholder. + + cursor = conn.parse("SELECT * FROM emp WHERE ename = :ename") + cursor.bind_param(1, 'SMITH') # bind by position + ...or... + cursor.bind_param(':ename', 'SMITH') # bind by name + +To bind as number, Integer, Fixnum and Float are available, but Bignum is +not supported. If its initial value is NULL, please set nil to +''type'' and Fixnum or Float to ''val''. + + cursor.bind_param(1, 1234) # bind as Fixnum, Initial value is 1234. + cursor.bind_param(1, 1234.0) # bind as Float, Initial value is 1234.0. + cursor.bind_param(1, nil, Fixnum) # bind as Fixnum, Initial value is NULL. + cursor.bind_param(1, nil, Float) # bind as Float, Initial value is NULL. + +In case of binding a string, set the string itself to +''val''. When the bind variable is used as output, set the +string whose length is enough to store or set the length. + + cursor = conn.parse("BEGIN :out := :in || '_OUT'; END;") + cursor.bind_param(':in', 'DATA') # bind as String with width 4. + cursor.bind_param(':out', nil, String, 7) # bind as String with width 7. + cursor.exec() + p cursor[':out'] # => 'DATA_OU' + # Though the length of :out is 8 bytes in PL/SQL block, it is + # bound as 7 bytes. So result is cut off at 7 byte. + +In case of binding a string as RAW, set OCI::RAW to ''type''. + + cursor = conn.parse("INSERT INTO raw_table(raw_column) VALUE (:1)") + cursor.bind_param(1, 'RAW_STRING', OCI8::RAW) + cursor.exec() + cursor.close() + +!! [key] +Gets the value of the bind variable. + +In case of binding explicitly, use same key with that of #bind_param. +A placeholder can be bound by +name or position. If you bind by name, use that name. If you bind +by position, use the position. + + cursor = conn.parse("BEGIN :out := 'BAR'; END;") + cursor.bind_param(':out', 'FOO') # bind by name + p cursor[':out'] # => 'FOO' + p cursor[1] # => nil + cursor.exec() + p cursor[':out'] # => 'BAR' + p cursor[1] # => nil + + cursor = conn.parse("BEGIN :out := 'BAR'; END;") + cursor.bind_param(1, 'FOO') # bind by position + p cursor[':out'] # => nil + p cursor[1] # => 'FOO' + cursor.exec() + p cursor[':out'] # => nil + p cursor[1] # => 'BAR' + +In case of binding by OCI8#exec or OCI8::Cursor#exec, +get the value by position, which starts from 1. + + cursor = conn.exec("BEGIN :out := 'BAR'; END;", 'FOO') + # 1st bind variable is bound as String with width 3. Its initial value is 'FOO' + # After execute, the value become 'BAR'. + p cursor[1] # => 'BAR' + +!! [key] = val +Sets the value to the bind variable. The way to specify the +''key'' is same with ''OCI8::Cursor#[]''. This is available +to replace the value and execute many times. + + cursor = conn.parse("INSERT INTO test(col1) VALUES(:1)") + cursor.bind_params(1, nil, String, 3) + ['FOO', 'BAR', 'BAZ'].each do |key| + cursor[1] = key + cursor.exec + end + cursor.close() + + ['FOO', 'BAR', 'BAZ'].each do |key| + conn.exec("INSERT INTO test(col1) VALUES(:1)", key) + end + +Both example's results are same. But the former will use less resources. + +!! keys +return the keys of bind variables as array. + +!! exec(*bindvars) +execute the SQL statement assigned the cursor. The type of +return value depends on the type of sql statement: select; +insert, update and delete; create, alter, drop and PL/SQL. + +In case of select statement, it returns the number of the +select-list. + +In case of insert, update or delete statement, it returns the +number of processed rows. + +In case of create, alter, drop and PL/SQL statement, it returns +true. In contrast with ''OCI8#exec'', it returns true even +though PL/SQL. Use ''OCI8::Cursor#[]'' explicitly to get bind +variables. + +!! type +gets the type of SQL statement. Its value is one of the follows. +* OCI8::STMT_SELECT +* OCI8::STMT_UPDATE +* OCI8::STMT_DELETE +* OCI8::STMT_INSERT +* OCI8::STMT_CREATE +* OCI8::STMT_DROP +* OCI8::STMT_ALTER +* OCI8::STMT_BEGIN +* OCI8::STMT_DECLARE +For PL/SQL statement, it returns OCI8::STMT_BEGIN or +OCI8::STMT_DECLARE. + +On ruby-oci8 1.0, these constants values are Fixnums. +On ruby-oci8 2.0, they are Symbols + +!! row_count +return the number of processed rows. + +!! get_col_names +get the names of select-list as array. Please use this +method after exec. + +!! column_metadata +(new in 1.0.0 without rc) + +get column information of the select statement. +You can get it after OCI8#exec or OCI8::Cursor#exec is executed. +This returns an array of [[api_OCI8MetadataColumn]]. + +!! fetch +get fetched data as an Array. This is available for select +statement only. + + conn = OCI8.new('scott', 'tiger') + cursor = conn.exec('SELECT * FROM emp') + while r = cursor.fetch() + puts r.join(',') + end + cursor.close + conn.logoff + +!! fetch_hash +get fetched data as a Hash. The hash keys are column names. + + +!! close +close the cursor. + +!! rowid +get the rowid of the last processed row. +This value is available as bind data. +On the other hand it isn't available for other purpose. + +!! prefetch_rows = rows +set prefetch rows to this cursor. +This value doesn't affect other cursors. Added: web/hiki_data/en/text/api_OCI8MetadataColumn =================================================================== --- web/hiki_data/en/text/api_OCI8MetadataColumn (rev 0) +++ web/hiki_data/en/text/api_OCI8MetadataColumn 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,140 @@ +Column Information + +(new in 1.0.0 without rc) + +! Class Methods + +No class methods are declared. + +This object is created by the following methods. +* [[OCI8::Cursor#column_metadata]] +* [[OCI8::Metadata::Table#columns]] +* [[OCI8::Metadata::View#columns]] + +! Instance Methods + +!! name +column name + +!! type_string +returns column definition as String. + + con = OCI8.new('username/password') + colinfo = con.describe_table('tab').columns + colinfo[0].type_string #=> "VARCHAR2(30) NOT NULL" + colinfo[1].type_string #=> "VARCHAR2(7)" + colinfo[2].type_string #=> "NUMBER" + +!! data_type +returns data type as Symbol. + +||!Oracle type||!data_type|| +||CHAR, NCHAR||:char|| +||VARCHAR2, NVARCHAR2||:varchar2|| +||RAW||:raw|| +||CLOB, NCLOB||:clob|| +||BLOB||:blob|| +||BFILE||:bfile|| +||NUMBER, FLOAT||:number|| +||BINARY_FLOAT||:binary_float|| +||BINARY_DOUBLE||:binary_double|| +||DATE||:date|| +||TIMESTAMP||:timestamp|| +||TIMESTAMP WITH TIME ZONE||:timestamp_tz|| +||TIMESTAMP WITH LOCAL TIME ZONE||:timestamp_ltz|| +||INTERVAL YEAR TO MONTH||:interval_ym|| +||INTERVAL DAY TO SECOND||:interval_ds|| + +!! charset_form +type of character set(default character set or national character set) + +||!Oracle type||!char_form|| +||CHAR(n)||:implicit|| +||VARCHAR2(n)||:implicit|| +||CHAR(n CHAR)||:implicit|| +||VARCHAR2(n CHAR)||:implicit|| +||NCHAR(n)||:nchar|| +||NVARCHAR2(n)||:nchar|| +||Others||nil|| + +!! nullable? +true if the column value can be null, otherwise false + +!! char_used? +true if the length is counted by number of characters. +otherwise false. + +||!Oracle type||!char_used?|| +||CHAR(n)||false|| +||VARCHAR2(n)||false|| +||CHAR(n CHAR)||true|| +||VARCHAR2(n CHAR)||true|| +||NCHAR(n)||true|| +||NVARCHAR2(n)||true|| + +!! char_size +length of character data type. +If char_used? is true, the length is counted by characters. +If false, it is counted by bytes. + +||!Oracle type||!char_size|| +||CHAR(n)||n|| +||VARCHAR2(n)||n|| +||CHAR(n CHAR)||n|| +||VARCHAR2(n CHAR)||n|| +||NCHAR(n)||n|| +||NVARCHAR2(n)||n|| + +!! data_size +maximum length of data in bytes. + +||!Oracle tyep||data_size|| +||CHAR(n), VARCHAR2(n)||n|| +||CHAR(n CHAR), VARCHAR2(n CHAR)||n times integer value (4 in my environment) || +||NCHAR(n), NVARCHAR2(n)||n times integer value (2 in my environment) || +||NUMBER, FLOAT||22|| +||BINARY_FLOAT||4|| +||BINARY_DOUBLE||8|| +||DATE||7|| +||TIMESTAMP||11|| +||TIMESTAMP WITH TIME ZONE||13|| +||TIMESTAMP WITH LOCAL TIME ZONE||11|| + +!! precision +precision of numeric data types. It is radix 10 for NUMBER, radix 2 for FLOAT. +A precision for FLOAT become that of NUMBER by multiplying 0.30103. +Zero precision means NUMBER whose precision and number are omitted. + +||!Oracle type||!precision|| +||NUMBER||0|| +||NUMBER(n)||n|| +||NUMBER(m, n)||m|| +||FLOAT||126|| +||FLOAT(n)||n|| + +!! scale +the number of digits to the right of the decimal point. If precision is not zero +and scale is -127, the data type is FLOAT, otherwise NUMBER. + +||!Oracle type||!scale|| +||NUMBER||-127 or 0|| +||NUMBER(n)||0|| +||NUMBER(m, n)||n|| +||FLOAT||-127|| +||FLOAT(n)||-127|| + +!! fsprecision +fractional seconds precision + +||!Oracle type||!fsprecision|| +||TIMEPTAMP(n)||n|| +||TIMESTAMP(n) WITH TIME ZONE||n|| +||TIMESTAMP(n) WITH LOCAL TIME ZONE||n|| +||INTERVAL DAY(m) TO SECOND(n)||n|| + +!! lfprecision +leading field precision + +||!Oracle type||!lfprecision|| +||INTERVAL YEAR(n) TO MONTH||n|| +||INTERVAL DAY(m) TO SECOND(n)||m|| Added: web/hiki_data/en/text/api_OCI8MetadataTable =================================================================== --- web/hiki_data/en/text/api_OCI8MetadataTable (rev 0) +++ web/hiki_data/en/text/api_OCI8MetadataTable 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,24 @@ +Table Information + +(new in 1.0.0 without rc) + +! Class Methods + +No class methods are declared. + +This object is created by the following methods. +* [[OCI8#describe_table(name)]] (when the name is a table name) + +! Instance Methods + +!! obj_schema +schema name + +!! obj_name +table name + +!! num_cols +number of columns. + +!! columns +an array of [[OCI8::Metadata::Column]] Added: web/hiki_data/en/text/api_OCI8MetadataView =================================================================== --- web/hiki_data/en/text/api_OCI8MetadataView (rev 0) +++ web/hiki_data/en/text/api_OCI8MetadataView 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,24 @@ +View Information + +(new in 1.0.0 without rc) + +! Class Methods + +No class methods are declared. + +This object is created by the following methods. +* [[OCI8#describe_table(name)]] (when the name is a view name) + +! Instance Methods + +!! obj_schema +schema name + +!! obj_name +view name + +!! num_cols +number of columns. + +!! columns +an array of [[OCI8::Metadata::Column]] Added: web/hiki_data/en/text/dbd_oci8 =================================================================== --- web/hiki_data/en/text/dbd_oci8 (rev 0) +++ web/hiki_data/en/text/dbd_oci8 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,139 @@ +DBD::OCI8 is a database driver of [[Ruby/DBI|http://ruby-dbi.rubyforge.org]]. +Refer to the following pages. +* [[DBI_SPEC|http://ruby-dbi.rubyforge.org/DBI_SPEC.html]] +* [[Using the Ruby DBI Module|http://www.kitebird.com/articles/ruby-dbi.html]] + +This article describes only the DBD::OCI8 specific features. + +!! connect to a remote server. + require 'dbi' + dbh = DBI.connect('DBI:OCI8:dbname', 'username', 'password') + +!! connect to a local server. + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', 'username', 'password') + +!! connect as sys user. + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', 'sys', 'password_of_sys', {'Privilege' => :SYSDBA}) +or + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', 'sys', 'password_of_sys', {'Privilege' => :SYSOPER}) + +!! OS authentication + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', nil, nil) + +!! non-blocking mode + + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', 'username', 'password', {'NonBlocking' => true}) + +After connected, SQL execution are done by non-blocking mode. + +note: Connecting to a server is done with blocking mode. + +!! bind variables + + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', 'username', 'password') + sth = dbh.parse('INSERT INTO emp(ename, sal) VALUES (?, ?)') + sth.execute('FOOMAN', 100) + +!! explicitly define the data type. + + dbh = DBI.connect('DBI:OCI8:', 'username', 'password') + sth = dbh.prepare('SELECT SYSDATE FROM DUAL') + sth.func(:define, 1, Date) # fetch the 1st column as Date. + sth.execute() + +!! BLOB + +To insert BLOB data: + + image = open('SagradaFamilia.gif', "rb").read() + # insert 'EMPTY_BLOB()' to the BLOB column. + sth = dbh.prepare("INSERT INTO photos(name, image) VALUES (?, EMPTY_BLOB())") + sth.execute("Sagrada Familia") + # get the rowid of inserted row. + rowid = sth.func(:rowid) # call driver specific code. + # select the empty BLOB column as a OCI8::BLOB. + lob = dbh.select_one("SELECT image FROM photos WHERE ROWID = ?", rowid)[0] # 1st row, 1st column + # write data to the LOB. + lob.write(image) + +To update BLOB data: + + new_image = open('SagradaFamilia.gif', "rb").read() + # select a BLOB column as a OCI8::BLOB with 'FOR UPDATE' to lock the row. + lob = dbh.select_one("SELECT image FROM photos WHERE name = ? FOR UPDATE", 'Sagrada familia')[0] + # write data to the lob by OCI8::BLOB#write(data). + lob.write(new_image) + # fix the length of its content by OCI8::BLOB#truncate(data.size). + lob.truncate(new_image.size) + +To select BLOB data: + # select a BLOB column as a OCI8::BLOB. + lob = dbh.select_one("SELECT image FROM photos WHERE name = ?", 'Sagrada familia')[0] + # read its content by OCI8::BLOB#read + image = lob.read() + +To delete BLOB data: + # delete the row. + dbh.do("DELETE FROM photos WHERE name = ?", 'Sagrada familia') + +!! CLOB + +To insert CLOB data: + + text = open('gutenberg.txt', "r").read() + # insert 'EMPTY_CLOB()' to the CLOB column. + sth = dbh.prepare("INSERT INTO books(title, content) VALUES (?, EMPTY_CLOB())") + sth.execute("Project Gutenberg") + # get the rowid of inserted row. + rowid = sth.func(:rowid) # call driver specific code. + # select the empty CLOB column as a OCI8::CLOB. + lob = dbh.select_one("SELECT content FROM books WHERE ROWID = ?", rowid)[0] # 1st row, 1st column + # write data to the LOB. + lob.write(text) + +To update CLOB data: + new_text = open('gutenberg.txt', "r").read() + # select a CLOB column as a OCI8::CLOB with 'FOR UPDATE' to lock the row. + lob = dbh.select_one("SELECT content FROM books WHERE title = ? FOR UPDATE", 'Project Gutenberg')[0] + # write data to the lob by OCI8::CLOB#write(data). + lob.write(new_text) + # fix the length of its content by OCI8::CLOB#truncate(OCI8::CLOB#pos). + # don't use "lob.truncate(new_text.size)". new_text.size is the number of bytes. + # But the 1st argument of #truncate is the number of characters. + lob.truncate(lob.pos) + +To select CLOB data: + # select a CLOB column as a OCI8::CLOB. + lob = dbh.select_one("SELECT content FROM books WHERE title = ?", 'Project Gutenberg')[0] + # read its content by OCI8::CLOB#read + text = lob.read() + +To delete CLOB data: + # delete the row. + dbh.do("DELETE FROM books WHERE content = ?", 'Project Gutenberg') + +!! output parameter + + # enable DBMS_OUTPUT package + dbh.do("BEGIN DBMS_OUTPUT.ENABLE; END;") + ... execute DBMS_OUTPUT.PUT_LINE ... + # get PUT_LINEed strings by using DBMS_OUTPUT.GET_LINE. + dbh.prepare("BEGIN DBMS_OUTPUT.GET_LINE(?, ?); END;") do |sth| + # bind the 1st parameter as string whose length is 255 + sth.bind_param(1, ' ' * 255) + # bind the 2rd parameter as integer + sth.bind_param(2, 0) + while true + sth.execute + # if the 2nd parameter value is zero, output value exists. + break if sth.func(:bind_value, 2) != 0 + # putput the 1st parameter value. + puts sth.func(:bind_value, 1) + end + end Added: web/hiki_data/en/text/dev_APIWrap =================================================================== --- web/hiki_data/en/text/dev_APIWrap (rev 0) +++ web/hiki_data/en/text/dev_APIWrap 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,65 @@ +[ ruby-oci8 2.0 only ] + +'ext/oci8/apiwrap.yml' is used for the following three purposes. +# Use non-blocking API easily. +# Check function existence at run-time. +# Trace function calls. + +! 1. Use non-blocking API easily. + +ruby 1.8's thread model is green. If one thread is blocked in +a C extension library, all threads are also blocked. ruby 1.9's +thread model is native. But ruby threads don't run parallel. +When one thread do a long operation in C, it should release a +global VM lock. The ways to prevent a C library from blocking +ruby itself are quite different in ruby 1.8 and 1.9. +But apiwrap make it easy. + +If you use a OCI function OCIFooBar() and it needs more than +one server round trip, you need to add the function name with +the following information +to apiwrap.yml. +* oracle version in which the function was added. +* ''':remote: true''' +* arguments + +If ''':remote:''' is true, apiwrap.rb makes a function +prototype of OCIFooBar_nb(). The only difference between +OCIFooBar() and OCIFooBar_nb() is that "oci8_svcctx_t *svcctx" +is added as a first argument of the latter. +What you need to do is to use OCIFooBar_nb() instead of OCIFooBar() +and pass oci8_svcctx_t* as the first argument. + +! 2. Check function existence at run-time. + +ruby-oci8 2.0 supports Oracle 8.0 or later. But you can use newly added +functions in later Oracle versions by one compiled binary oci8lib.so. +This is useful when we make a compiled Windows package. We need to make +packages depends on Oracle versions without this feature, + +If you use a OCI function OCIFooBar which was added in Oracle X.Y.Z, +you need to add the function name with the following information to apiwrap.yml. +* ''':version: XYZ''' (without dots. 8.1.7 -> 817, 10.1.0 -> 1010, etc) +* :remote: true or false +* arguments + +In C code: + if remote is true: + if (have_OCIFooBar_nb) { + can OCIFooBar_nb + } else { + don't use OCIFooBar_nb here + } + if remote is false: + if (have_OCIFooBar) { + can OCIFooBar + } else { + don't use OCIFooBar here + } +have_OCIFooBar is a variable if runtime API-check is enabled. +It is a macro if runtime check is disabled. + +! 3. Trace function calls. + +We have not implemented yet. All OCI function calls can be logged by this feature. +It will be useful when debugging. Added: web/hiki_data/en/text/dev_CodingStyle =================================================================== --- web/hiki_data/en/text/dev_CodingStyle (rev 0) +++ web/hiki_data/en/text/dev_CodingStyle 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,52 @@ +! Indent Style in C + +Use same indent style with existing code. +One indentation is made by 4 spaces. No tabs are used +because their width depends on environments. + +* indentation by 4 spaces. + not: + if (a < b) { + return a; + } + but: + if (a < b) { + return a; + } +* space after '''if''', '''while''' and '''for'''. +* braces on '''if''', '''while''' and '''for''' line. +* no space on inner side of parentheses. +* spaces on both sides of binary operators(<, >, ==, !=, =, +=, etc.). +* no space between unary operators(++, --, !, etc.) and their operands. + not: + if( a "", +"sp.notselected" => "bbs.rb\nmath.rb\ncd.rb\nsearch.rb\nshow_plugins.rb\nrss.rb\nedit_user.rb\nisbn.rb\ntodo.rb\ncomment.rb\ndiffmail.rb\nhistory.rb\nappend-css.rb\nhighlight.rb\nsrc.rb\ncategory.rb\norphan.rb\nits.rb\ntrackback.rb\nnote.rb\nauth_typekey.rb\nquote_page.rb\nrbl.rb\nrss-show.rb\nfrozenmark.rb\nreferer.rb\nincremental_search.rb\npagerank.rb\nrank.rb\nrecent2.rb\nattach.rb\nentityref.rb\nfootnote.rb\ntemplate.rb\namazon.rb\nsitemap.rb\nsimilarity.rb\nreadlirs.rb\nkeyword.rb\n", +"sp.selected" => "google-sitemaps.rb\n", +"template.autoinsert" => true, +"template.default" => "InterWikiName", +"template.keyword" => nil, +"user.auth" => 0, +"user.list" => { +}, +} + +# +# XML-RPC interfaces +# +xmlrpc_enabled = true Added: web/hiki_data/ja/info.db =================================================================== --- web/hiki_data/ja/info.db (rev 0) +++ web/hiki_data/ja/info.db 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,317 @@ +{ +"APIReference" => { +:count => 39, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1168172768), +:references => [ +], +:title => "API\343\203\252\343\203\225\343\202\241\343\203\254\343\203\263\343\202\271", +}, +"FAQ" => { +:count => 46, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169647266), +:references => [ +"FAQ_plsql_out_param", +"FAQ_long_or_long_raw", +"FAQ_uninstall", +], +:title => "FAQ", +}, +"FAQ_long_or_long_raw" => { +:count => 14, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169695529), +:references => [ +], +:title => "LONG \343\202\204 LONG RAW \343\201\256\343\203\207\343\203\274\343\202\277\343\202\222\344\275\277\343\201\206\343\201\253\343\201\257\357\274\237", +}, +"FAQ_plsql_out_param" => { +:count => 20, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169647626), +:references => [ +], +:title => "PL/SQL \343\201\256 OUT \343\203\221\343\203\251\343\203\241\343\203\274\343\202\277\343\202\222\345\217\226\345\276\227\343\201\231\343\202\213\343\201\253\343\201\257\357\274\237", +}, +"FAQ_uninstall" => { +:count => 10, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169620412), +:references => [ +], +:title => "\343\202\242\343\203\263\343\202\244\343\203\263\343\202\271\343\203\210\343\203\274\343\203\253\346\226\271\346\263\225", +}, +"FrontPage" => { +:count => 120, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1168180666), +:references => [ +"InstallForInstantClient", +], +:title => "\343\203\210\343\203\203\343\203\227\343\203\232\343\203\274\343\202\270", +}, +"HowToInstall" => { +:count => 50, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1168175239), +:references => [ +"InstallBinaryPackage", +"InstallForFullClient", +"InstallForInstantClient", +], +:title => "\343\202\244\343\203\263\343\202\271\343\203\210\343\203\274\343\203\253\346\226\271\346\263\225", +}, +"InstallBinaryPackage" => { +:count => 32, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1171256479), +:references => [ +], +:title => "\343\203\220\343\202\244\343\203\212\343\203\252\343\203\221\343\203\203\343\202\261\343\203\274\343\202\270", +}, +"InstallForFullClient" => { +:count => 35, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1192083462), +:references => [ +"ReportInstallProblem", +], +:title => "Oracle Full Client", +}, +"InstallForInstantClient" => { +:count => 30, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1192083565), +:references => [ +"ReportInstallProblem", +], +:title => "Oracle Instant Client", +}, +"InterWikiName" => { +:count => 1, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1168065461), +:references => [ +], +:title => "InterWikiName", +}, +"PlatformSpecificIssue" => { +:count => 53, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1192665989), +:references => [ +"InstallForInstantClient", +"InstallForFullClient", +], +:title => "\343\203\227\343\203\251\343\203\203\343\203\210\343\203\225\343\202\251\343\203\274\343\203\240\345\233\272\346\234\211\343\201\256\345\225\217\351\241\214", +}, +"ReportInstallProblem" => { +:count => 37, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1168171996), +:references => [ +"PlatformSpecificIssue", +], +:title => "\343\202\244\343\203\263\343\202\271\343\203\210\343\203\274\343\203\253\346\231\202\343\201\256\345\225\217\351\241\214\343\202\222\345\240\261\345\221\212", +}, +"SideMenu" => { +:count => 49, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195826076), +:references => [ +"FrontPage", +"HowToInstall", +"InstallBinaryPackage", +"InstallForFullClient", +"InstallForInstantClient", +"ReportInstallProblem", +"PlatformSpecificIssue", +"APIReference", +"api", +"api_OCI8", +"api_OCI8Cursor", +"api_OCI8CLOB", +"api_OCI8BLOB", +"api_OCI8BFILE", +"api_OCI8MetadataTable", +"api_OCI8MetadataView", +"api_OCI8MetadataColumn", +"dbd_oci8", +"FAQ", +], +:title => "SideMenu", +}, +"api" => { +:count => 24, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195830335), +:references => [ +"api_OCI8", +"api_OCI8Cursor", +"api_OCI8CLOB", +"api_OCI8BLOB", +"api_OCI8BFILE", +"api_OCI8MetadataTable", +"api_OCI8MetadataView", +"api_OCI8MetadataColumn", +], +:title => "ruby-oci8 API", +}, +"api_OCI8" => { +:count => 54, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195983141), +:references => [ +"api_OCI8Cursor", +"api_OCI8MetadataTable", +"api_OCI8MetadataView", +"FAQ_long_or_long_raw", +], +:title => "OCI8", +}, +"api_OCI8BFILE" => { +:count => 35, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169304867), +:references => [ +], +:title => "OCI8::BFILE", +}, +"api_OCI8BLOB" => { +:count => 34, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1169304807), +:references => [ +], +:title => "OCI8::BLOB", +}, +"api_OCI8CLOB" => { +:count => 40, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195210460), +:references => [ +], +:title => "OCI8::CLOB", +}, +"api_OCI8Cursor" => { +:count => 51, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195829930), +:references => [ +"api_OCI8MetadataColumn", +], +:title => "OCI8::Cursor", +}, +"api_OCI8MetadataColumn" => { +:count => 0, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195977210), +:references => [ +"api_OCI8Cursor", +"api_OCI8MetadataTable", +"api_OCI8MetadataView", +], +:title => "OCI8::Metadata::Column", +}, +"api_OCI8MetadataTable" => { +:count => 0, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195902157), +:references => [ +"api_OCI8", +"api_OCI8MetadataColumn", +], +:title => "OCI8::Metadata::Table", +}, +"api_OCI8MetadataView" => { +:count => 0, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195902198), +:references => [ +"api_OCI8", +"api_OCI8MetadataColumn", +], +:title => "OCI8::Metadata::View", +}, +"dbd_oci8" => { +:count => 38, +:editor => nil, +:freeze => false, +:keyword => [ +], +:last_modified => Time.at(1195983804), +:references => [ +], +:title => "DBD::OCI8", +}, +} \ No newline at end of file Property changes on: web/hiki_data/ja/session ___________________________________________________________________ Name: svn:ignore + * Added: web/hiki_data/ja/text/APIReference =================================================================== --- web/hiki_data/ja/text/APIReference (rev 0) +++ web/hiki_data/ja/text/APIReference 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,36 @@ +! ?????API + +ruby-oci8??????? ruby-oci8 ???????API??????4??????? +# ruby-oci8 native API +# ruby-dbi +# ActiveRecord +# Og (ObjectGraph) + +! ruby-oci8 native API + +??? ruby-oci8 ???????API??? +ruby-oci8 API ?2????????????????? +'??API' ???????? '??API'???????????????????API????????????API???????????ruby-oci8 2.0.x ?????????? + +* [[ruby-oci8 API|http://www.jiubao.org/ruby-oci8/api.ja.html]] +* [[ruby-oci8 ??API|http://www.jiubao.org/ruby-oci8/manual.ja.html]] (???????) + +! ruby-dbi + +ruby-oci8 ? Oracle ??DBD?????DBD::OCI8 ????????ruby-dbi ? API ???????? + +* [[DBD::OCI8|http://www.jiubao.org/ruby-oci8/dbd_oci8.ja.html]] + +! ActiveRecord + +ActiveRecord ?[[Ruby on Rails|http://www.rubyonrails.org/]]?ORM(????????????????????)????????Oracle??????????????ruby-oci8 ?????????? + +* [[Rails: Complete API|http://api.rubyonrails.org/]] +* [[Oracle on Rails Wiki|http://wiki.rubyonrails.com/rails/pages/Oracle]] + +! Og (ObjectGraph) + +Og (ObjectGraph) ?ORM(????????????????????)???????? +????????????p(^^;) + +* [[http://www.nitroproject.org/]] Added: web/hiki_data/ja/text/FAQ =================================================================== --- web/hiki_data/ja/text/FAQ (rev 0) +++ web/hiki_data/ja/text/FAQ 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,3 @@ +* [[FAQ_plsql_out_param]] +* [[FAQ_long_or_long_raw]] +* [[FAQ_uninstall]] Added: web/hiki_data/ja/text/FAQ_long_or_long_raw =================================================================== --- web/hiki_data/ja/text/FAQ_long_or_long_raw (rev 0) +++ web/hiki_data/ja/text/FAQ_long_or_long_raw 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,35 @@ +{{toc}} + +! LONG + +!! LONG????????&?? +???????????????????????????&????????? + +??: 0.1.15????????65535???0.1.16??? 2G ??? + +!! LONG????????????? + +0.1.15????????65535??? +0.1.16 ? 1.0.x ???OCI8#long_read_len ???????????? + + # ???????????? + conn.long_read_len = 1024 * 1024 * 2 + +2.0.x ?????? 2G ???long_read_len ?????????long_read_len ? LONG ?????????????????????????????????????? + +! LONG RAW + +!! LONG RAW ????????&?? + +???? RAW ??????????? + filename = 'SagradaFamilia.gif' + image = open(filename, "rb").read() + cursor = conn.parse('insert into photos values(:1,:2)') + cursor.bind_param(1, filename)) + # bind image as RAW + cursor.bind_param(2, image, OCI8::RAW) + cursor.exec + +!! LONG RAW ????????????? + +????????????????? LONG ???????????????? Added: web/hiki_data/ja/text/FAQ_plsql_out_param =================================================================== --- web/hiki_data/ja/text/FAQ_plsql_out_param (rev 0) +++ web/hiki_data/ja/text/FAQ_plsql_out_param 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,86 @@ +{{toc}} + +! ????????????????????? + CREATE OR REPLACE PACKAGE my_package IS + PROCEDURE my_proc(a1 IN number, a2 IN varchar2, b1 OUT number, b2 OUT varchar2); + END; + / + CREATE OR REPLACE PACKAGE BODY my_package IS + PROCEDURE my_proc(a1 IN number, a2 IN varchar2, b1 OUT number, b2 OUT varchar2) IS + BEGIN + b1 := a1 * 2; + b2 := UPPER(a2); + END; + END; + / + +! ruby-oci8 API +!! ??????????????????????? + # use OCI8::Cursor#bind_param and OCI8::Cursor#exec + cursor = conn.parse('begin my_package.my_proc(:a1, :a2, :b1, :b2); end;') + cursor.bind_param(':a1', 123) + cursor.bind_param(':a2', 'abc') + # Fixnum ?????????? NULL + cursor.bind_param(':b1', nil, Fixnum) + # String ???????????????? 20 ???? NULL? + cursor.bind_param(':b2', nil, String, 20) + cursor.exec() + # ???????????????????????? + p cursor[':b1'] # => 246 + p cursor[':b2'] # => ABC + +!! ??????????????????????? + # use OCI8::Cursor#bind_param and OCI8::Cursor#exec + cursor = conn.parse('begin my_package.my_proc(:a1, :a2, :b1, :b2); end;') + cursor.bind_param(1, 123) + cursor.bind_param(2, 'abc') + cursor.bind_param(3, nil, Fixnum) + cursor.bind_param(4, nil, String, 20) + cursor.exec() + # ???????????????????????? + p cursor[3] # => 246 + p cursor[4] # => "ABC" + +!! ????????????????? + # use OCI8::Cursor#exec with bind parameters. + cursor = conn.parse('begin my_package.my_proc(:a1, :a2, :b1, :b2); end;') + cursor.exec(123, 'abc', [nil, Fixnum], [nil, String, 20]) + # ??????????????????????? + # ??????????????....? + # ??????????????????????????? + # ??????????????????????? + # ???????????????????? + p cursor[3] # => 246 + p cursor[4] # => "ABC" + +!! ???????????????????????? + # OCI8#exec with bind parameters + # ???? SQL ? PL/SQL ?????????????????????????? + params = conn.exec('begin my_package.my_proc(:a1, :a2, :b1, :b2); end;', + 123, 'abc', [nil, Fixnum], [nil, String, 20]) + p params[0] # => 123 + p params[1] # => "abc" + p params[2] # => 246 + p params[3] # => "ABC" + +! DBD::OCI8 +Ruby/DBI ????? OUT ?????????????????DBD??????? +???????????? + sth = dbh.prepare('begin my_package.my_proc(?, ?, ?, ?); end;') + sth.bind_param(1, 123) + sth.bind_param(2, 'abc') + # NULL??????????? type ?????????? nil ???? + sth.bind_param(3, nil, {'type' => Fixnum}) + # ???????????????????????????NULL?? + # ????????? + sth.bind_param(4, ' ' * 20) + sth.execute + # DBD?????????????? + p sth.func(:bind_value, 3) # => 246 + p sth.func(:bind_value, 4) # => "ABC" + +! Rails (ActiveRecord) + +??????????????ruby-oci8 API ?????? + conn = ActiveRecord::Base.connection.raw_connection + ... Added: web/hiki_data/ja/text/FAQ_uninstall =================================================================== --- web/hiki_data/ja/text/FAQ_uninstall (rev 0) +++ web/hiki_data/ja/text/FAQ_uninstall 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,10 @@ +???????????????????? +* oci8.rb +* oci8lib.so +* DBD/OCI8/OCI8.rb + +oci8.rb ? DBD/OCI8/OCI8.rb ? sitelib ???????????? + ruby -r rbconfig -e "puts Config::CONFIG['sitelibdir']" + +oci8lib.so ? sitearch ???????????? + ruby -r rbconfig -e "puts Config::CONFIG['sitearchdir']" Added: web/hiki_data/ja/text/FrontPage =================================================================== --- web/hiki_data/ja/text/FrontPage (rev 0) +++ web/hiki_data/ja/text/FrontPage 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,13 @@ +! What is ruby-oci8 + +ruby-oci8 ?[[Oracle Database]]?? ruby ???????????Oracle8, Oracle8i, Oracle9i, Oracle10g, [[Oracle XE]], [[Oracle Instant Client]]???????? + +??: ruby-oci8-1.0 ??????????ruby-oci8-2.0-unstable ????????????? +2.0-unstable ????????????????????????? + +Oracle7 ??????????????????[[Oracle7 Module for Ruby]]????????? + +! One-liner ????? + +scott/tiger ??????emp ????? select ???CSV ???????? + ruby -r oci8 -e "OCI8.new('scott', 'tiger').exec('select * from emp') do |r| puts r.join(','); end" Added: web/hiki_data/ja/text/HowToInstall =================================================================== --- web/hiki_data/ja/text/HowToInstall (rev 0) +++ web/hiki_data/ja/text/HowToInstall 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,5 @@ +Windows ?????????????????????????????????? +* [[InstallBinaryPackage]] (Windows ??) +???????????????????Oracle?????????????????????? +* [[InstallForFullClient]] +* [[InstallForInstantClient]] Added: web/hiki_data/ja/text/InstallBinaryPackage =================================================================== --- web/hiki_data/ja/text/InstallBinaryPackage (rev 0) +++ web/hiki_data/ja/text/InstallBinaryPackage 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,12 @@ +! 1. Oracle??????????????? + +?????????? Oracle 8.1.5 ???????????? + +! 2. ?????? + +[[rubyforge|http://rubyforge.org/frs/?group_id=256]]?? ruby-oci8-VERSION-mswin32.rb ?????????????? + +??: 1.0 ????????2.0-unstable ????????????? + +! 3. ??????????? + C:> ruby ruby-oci8-VERSION-mswin32.rb Added: web/hiki_data/ja/text/InstallForFullClient =================================================================== --- web/hiki_data/ja/text/InstallForFullClient (rev 0) +++ web/hiki_data/ja/text/InstallForFullClient 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,80 @@ +! 1. ????????????? + +[[rubyforge|http://rubyforge.org/frs/?group_id=256]]?? ruby-oci8-VERSION.tar.gz ?????????????? + +??: 1.0 ????????2.0-unstable ????????????? + +! 2. '''ruby''' ? PATH ????????? + +!! UNIX + $ ruby -v + ruby 1.8.5 (2006-08-25) [i486-linux] + +!! Windows + C:\> ruby -v + ruby 1.8.5 (2006-08-25) [i386-mswin32] + +! 3. '''make''' ? PATH ????????? + +!! UNIX or Windows(cygwin, mingw32) + $ which make + +!! Windows(mswin32) + C:\> nmake /? +nmake ???????????vcvars32.bat ?????????????????? + C:\> C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat + C:\> nmake /? + +! 4. '''sqlplus''' ?????????? + +!! UNIX + $ sqlplus USERNAME/PASSWORD + +!! Windows + C:\> sqlplus USERNAME/PASSWORD + +! 5. ???????????? + +!! UNIX + +??????OS??????????? $ORACLE_HOME/lib ??????????? +????64???????????????32???? ruby ??????????? +$ORACLE_HOME/lib32 ???????????? + +||!OS||!library search path name|| +||Linux||LD_LIBRARY_PATH|| +||Solaris 32-bit ruby||LD_LIBRARY_PATH_32 or LD_LIBRARY_PATH|| +||Solaris 64-bit ruby||LD_LIBRARY_PATH_64 or LD_LIBRARY_PATH|| +||HP-UX PA-RISC 32-bit ruby||SHLIB_PATH|| +||HP-UX PA-RISC 64-bit ruby||LD_LIBRARY_PATH|| +||HP-UX IA64||LD_LIBRARY_PATH|| +||Mac OS X||DYLD_LIBRARY_PATH|| +||AIX||LIBPATH|| + +??????? export ????????? + $ LD_LIBRARY_PATH=$ORACLE_HOME/lib + $ export LD_LIBRARY_PATH + +!! Windows +sqlplus ???????????????????????????? + +! 6. make and install + +???????????[[????????|ReportInstallProblem]]? + +!! UNIX or Windows(cygwin, mingw32) + + gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf - + cd ruby-oci8-VERSION + make + make install + +note: '''sudo'''?????????'make install'????????????????? +??????????????sudo ?????????????????????????? + +!! Windows(mswin32) + + gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf - + cd ruby-oci8-VERSION + nmake + nmake install Added: web/hiki_data/ja/text/InstallForInstantClient =================================================================== --- web/hiki_data/ja/text/InstallForInstantClient (rev 0) +++ web/hiki_data/ja/text/InstallForInstantClient 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,110 @@ +! 1. ????????????? + +[[rubyforge|http://rubyforge.org/frs/?group_id=256]]?? ruby-oci8-VERSION.tar.gz ?????????????? + +??: 1.0 ????????2.0-unstable ????????????? + +! 2. Instant Client ??????? + +?????????????? +"Instant Client Package - '''Basic'''" ? "Instant Client Package - '''SDK'''" +? [[Oracle Technology Network|http://otn.oracle.co.jp/tech/oci/instantclient/instantclient.html]] +??????????????? + +note: 64???OS????ruby ? 32??????? 32??????????????????? + +! 3. Instant Client ??????? + +!! UNIX zip packages + + mkdir /opt + mkdir /opt/oracle + cd /opt/oracle + unzip path/to/instantclient-basic-OS-VERSION.zip + unzip path/to/instantclient-sdk-OS-VERSION.zip + +!! Linux rpm packages + + rpm -i path/to/oracle-instantclient-basic-VERSION-ARCH.rpm + rpm -i path/to/oracle-instantclient-devel-VERSION-ARCH.rpm + +!! Windows + + C: + mkdir C:\oracle + cd c:\oracle + unzip path/to/instantclient-basic-OS-VERSION.zip + unzip path/to/instantclient-sdk-OS-VERSION.zip + +! 4. ??????????????????? (UNIX zip packages only) + +!! UNIX + +/opt/oracle/instantclient10_1/libclntsh.so ???????????????? +?????????? + + cd /opt/oracle/instantclient10_1 + ln -s libclntsh.so.10.1 libclntsh.so + +Note: +* HP-UX PA-RISC ???libclntsh.so ????? libclntsh.sl ???? +* Mac OS X ???libclntsh.so ????? libclntsh.dylib ???? +* AIX ???????????????? + +! 5. ???????????? + +?????????????????????????? +????? + +||!OS||!Environment Variable Name|| +||Linux||LD_LIBRARY_PATH|| +||Solaris 32-bit ruby||LD_LIBRARY_PATH_32 or LD_LIBRARY_PATH|| +||Solaris 64-bit ruby||LD_LIBRARY_PATH_64 or LD_LIBRARY_PATH|| +||HP-UX PA-RISC 32-bit ruby||SHLIB_PATH|| +||HP-UX PA-RISC 64-bit ruby||LD_LIBRARY_PATH|| +||HP-UX IA64||LD_LIBRARY_PATH|| +||Mac OS X||DYLD_LIBRARY_PATH|| +||AIX||LIBPATH|| +||Windows||PATH|| + +!! UNIX zip packages + +For example: + $ LD_LIBRARY_PATH=/opt/oracle/instantclient_10_2 + $ export LD_LIBRARY_PATH + +!! Linux rpm packages + +For example: + $ LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.3/client/lib + $ export LD_LIBRARY_PATH + +!! Windows + +For example: + C:\> PATH=C:\oracle\instantclient_10_2;%PATH% + +! 6. make and install. + +???????????[[????????|ReportInstallProblem]]? + +!! UNIX or Windows(cygwin, mingw32) + + gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf - + cd ruby-oci8-VERSION + make + make install + +ruby-oci8 ? Instant Client ?????????????????????? + +note: '''sudo'''?????????'make install'????????????????? +??????????????sudo ?????????????????????????? + +!! Windows(mswin32) + + gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf - + cd ruby-oci8-VERSION + nmake + nmake install + +ruby-oci8 ? Instant Client ?????????????????????? Added: web/hiki_data/ja/text/InterWikiName =================================================================== --- web/hiki_data/ja/text/InterWikiName (rev 0) +++ web/hiki_data/ja/text/InterWikiName 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,4 @@ +* [[Oracle Database|http://www.oracle.co.jp]] alias +* [[Oracle XE|http://www.oracle.com/technology/products/database/xe/index.html]] alias +* [[Oracle Instant Client|http://otn.oracle.co.jp/tech/oci/instantclient/instantclient.html]] alias +* [[Oracle7 Module for Ruby|http://www.yoshidam.net/Ruby.html#oracle]] alias Added: web/hiki_data/ja/text/PlatformSpecificIssue =================================================================== --- web/hiki_data/ja/text/PlatformSpecificIssue (rev 0) +++ web/hiki_data/ja/text/PlatformSpecificIssue 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,89 @@ +! Intel Mac + +Oracle ? intel mac ???????????????? +[[Oracle Instant Client]] 10.1.0.3 ? ppc ????????intel CPU ?? ruby ?????????? +(???????? Mac OS X ?? instant client ???????? +[[??????|http://www.oracle.com/technology/tech/oci/instantclient/index.html]]??????) + + +?????????????????? +* ruby ? ppc ???????????([[Raimonds Simanovskis???blog|http://blog.rayapps.com/2007/08/27/how-to-setup-ruby-and-oracle-client-on-intel-mac/]] ???) +* [[ruby-odbc|http://www.ch-werner.de/rubyodbc/]]?????????ODBC????([[Actual Technologies|http://www.actualtechnologies.com/]] ??? [[OpenLink Software|http://uda.openlinksw.com/]])?????? + +! Solaris + +ruby ????????????????????????? + +ruby ???????2??????? +# [[Sunfreeware.com|http://www.sunfreeware.com/]] +# [[Blastwave.org|http://www.blastwave.org/]] + +??? gcc ???????????????[[Sun Studio|http://developers.sun.com/sunstudio/]]????????????? +???????????????????? + +Blastwave.org?ruby???????Sun Studio????????????????rbconfig.rb ???????????????[[(?????)|http://forum.textdrive.com/viewtopic.php?id=12630]] + +! Linux + +ruby ??????????????????????????? x86_64 ?? ruby ?? x86_64 ? instant client, 32???? ruby ?? 32???? instant client ??????OS??????????ruby ?????????????? +full client ????x86_64 ? ruby ? 32 ???? full client ?????????????32 ??? ruby ? 64 ???? full client ????????32?????????? $ORACLE_HOME/lib32 ???????? + +ruby ??????????????????????????? + file `which ruby` +??: '''`''' ??????????? + +! FreeBSD + +2?????????? +* instantclient ? linux emulator ?? ruby ????? +* oracle8-client port ???? + +oracle8-client ?????????????????? +* oracle8-client ??????? + cd /usr/ports/databases/oracle8-client + make + make install +* ???? ORACLE_HOME ??? + export ORACLE_HOME=/usr/local/oracle8-client +* ruby-oci8 ???????????? oraconf.rb ??????? + tar xvfz ruby-oci8-1.0.0-rc3.tar.gz + cd ruby-oci8-1.0.0-rc3/ext/oci8 + mv oraconf.rb oraconf.rb.orig + wget http://ruby-oci8.rubyforge.org/svn/branches/ruby-oci8-1.0/ext/oci8/oraconf.rb + +??????? [[InstallForFullClient]]???????? + +note: oracle8-client port ?Oracle????????????? +????????????LD_LIBRARY_PATH ???????? +???? + +FreeBSD ??????????????????make check +????????????????????????????? +????????????????????????????? + +! HP-UX + +libpthread?libcl ???????? ruby ?????? + +???[[http://www.alfonsomartone.itb.it/xvpucf.html]]???????? + +! Windows + +????I/O??????????????????????????????????????????????? + Permission denied - conftest.exe + +?????? mkmf.rb ?????????? + + def try_run(src, opt="") + if try_link0(src, opt) + xsystem("./conftest") + else + nil + end + ensure + # add the following one line. + sleep 1 if /mswin32|cygwin|mingw32|bccwin32/ =~ RUBYPLATFORM + rm_f "conftest*" + end + +??: [[http://abstractplain.net/blog/?p=788]] Added: web/hiki_data/ja/text/ReportInstallProblem =================================================================== --- web/hiki_data/ja/text/ReportInstallProblem (rev 0) +++ web/hiki_data/ja/text/ReportInstallProblem 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,31 @@ +?????? [[rubyforge help forum|http://rubyforge.org/forum/forum.php?forum_id=1078]] ???????[[?|mailto:kubo at jiubao.org]]??????????? + +note: ????????? [[PlatformSpecificIssue]] ????????? + +! 'ext/oci8/mkmf.log' ????100? + + tail -100 ext/oci8/mkmf.log + +! ???????????? + ruby --version + ruby -r rbconfig -e "p Config::CONFIG['host']" + ruby -r rbconfig -e "p Config::CONFIG['CC']" + ruby -r rbconfig -e "p Config::CONFIG['CFLAGS']" + ruby -r rbconfig -e "p Config::CONFIG['LDSHARED']" + ruby -r rbconfig -e "p Config::CONFIG['LDFLAGS']" + ruby -r rbconfig -e "p Config::CONFIG['DLDLAGS']" + ruby -r rbconfig -e "p Config::CONFIG['LIBS']" + ruby -r rbconfig -e "p Config::CONFIG['GNU_LD']" +!! gcc ???????? + gcc --print-prog-name=ld + gcc --print-prog-name=as +!! 32????64??????????????????? + file `which ruby` + file $ORACLE_HOME/bin/oracle # Full Client + file INSTANT_CLIENT_DIRECTORY/libclntsh.* # Instant Client + echo $LD_LIBRARY_PATH + echo $LIBPATH # AIX + echo $SHLIB_PATH # HP-UX PA-RISC 32-bit ruby + echo $DYLD_LIBRARY_PATH # Mac OS X + echo $LD_LIBRARY_PATH_32 # Solaris 32-bit ruby + echo $LD_LIBRARY_PATH_64 # Solaris 64-bit ruby Added: web/hiki_data/ja/text/SideMenu =================================================================== --- web/hiki_data/ja/text/SideMenu (rev 0) +++ web/hiki_data/ja/text/SideMenu 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,31 @@ +{{logo}} +{{br}} +[ {{link_to_english}} | Japanese ] + +'''This site is under construction.''' + +! ?????? + +!! [[FrontPage]] + +!! Install and Setup +* [[HowToInstall]] +** [[InstallBinaryPackage]] +** [[InstallForFullClient]] +** [[InstallForInstantClient]] +* [[ReportInstallProblem]] +* [[PlatformSpecificIssue]] +!! ???? +* [[APIReference]] +** [[api]] +*** [[api_OCI8]] +*** [[api_OCI8Cursor]] +*** [[api_OCI8CLOB]] +*** [[api_OCI8BLOB]] +*** [[api_OCI8BFILE]] +*** [[api_OCI8MetadataTable]] +*** [[api_OCI8MetadataView]] +*** [[api_OCI8MetadataColumn]] +** [[dbd_oci8]] + +* [[FAQ]] Added: web/hiki_data/ja/text/api =================================================================== --- web/hiki_data/ja/text/api (rev 0) +++ web/hiki_data/ja/text/api 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,8 @@ +* [[api_OCI8]] {{toc_here(api_OCI8)}} +* [[api_OCI8Cursor]] {{toc_here(api_OCI8Cursor)}} +* [[api_OCI8CLOB]] {{toc_here(api_OCI8CLOB)}} +* [[api_OCI8BLOB]] {{toc_here(api_OCI8BLOB)}} +* [[api_OCI8BFILE]] {{toc_here(api_OCI8BFILE)}} +* [[api_OCI8MetadataTable]] {{toc_here(api_OCI8MetadataTable)}} +* [[api_OCI8MetadataView]] {{toc_here(api_OCI8MetadataView)}} +* [[api_OCI8MetadataColumn]] {{toc_here(api_OCI8MetadataColumn)}} Added: web/hiki_data/ja/text/api_OCI8 =================================================================== --- web/hiki_data/ja/text/api_OCI8 (rev 0) +++ web/hiki_data/ja/text/api_OCI8 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,160 @@ +??????????????????????????????JDBC ? +java.sql.Connection, Perl/DBI ? database handle: $dbh ??????? + +! ??????? + +!! OCI8.new(userid, password, dbname = nil, privilege = nil) + +''userid'', ''password'' ???????????????''dbname'' ? Net8 ? +????????DBA ????????? ''privilege'' ? :SYSDBA ?? +? :SYSOPER??????? +Oracle ??????? 10g ??????''dbname'' ????"//????_or_IP:?????/ORACLE_SID" +???????? + + # sqlplus scott/tiger + conn = OCI8.new("scott", "tiger") + + # sqlplus scott/tiger at orcl.world + conn = OCI8.new("scott", "tiger", "orcl.world") + + # sqlplus 'sys/change_on_install as sysdba' + conn = OCI8.new("sys", "change_on_install", nil, :SYSDBA) + + # sqlplus scott/tiger@//oracle_db.example.com/XE + conn = OCI8.new("scott", "tiger", "//oracle_db.example.com/XE") + +OS??????Oracle????????userid, password ? nil ?????????(new in 1.0.0-rc2) + +! ?????????? + +!! logoff() +???????????????????????????????? +??????????? + + conn = OCI8.new("scott", "tiger") + ... do something ... + conn.logoff + +!! exec(sql, *bindvars) +sql ????????sql ?? SELECT??INSERT/UPDATE/DELETE?? +CREATE/ALTER/DROP??PL/SQL??????????????????? +??? + +''bindvars'' ????????????????????????????? + +SELECT ???????????????[[OCI8::Cursor]] ??????? +?????? + + conn = OCI8.new('scott', 'tiger') + cursor = conn.exec('SELECT * FROM emp') + while r = cursor.fetch() + puts r.join(',') + end + cursor.close + conn.logoff + +SELECT ???????????????????????????? +???????????????????????????????? +???NULL?? ruby ??? nil ????????????? + + conn = OCI8.new('scott', 'tiger') + num_rows = conn.exec('SELECT * FROM emp') do |r| + puts r.join(',') + end + puts num_rows.to_s + ' rows were processed.' + conn.logoff + +INSERT/UPDATE/DELETE????????????????????? + + conn = OCI8.new('scott', 'tiger') + num_rows = conn.exec('UPDATE emp SET sal = sal * 1.1') + puts num_rows.to_s + ' rows were updated.' + conn.logoff + +CREATE/ALTER/DROP?????true ?????? + + conn = OCI8.new('scott', 'tiger') + conn.exec('CREATE TABLE test (col1 CHAR(6))') + conn.logoff + +PL/SQL????????????????????????????? + + conn = OCI8.new('scott', 'tiger') + conn.exec("BEGIN :str := TO_CHAR(:num, 'FM0999'); END;", 'ABCD', 123) + # => ["0123", 123] + conn.logoff + +???????'':str'' ? '':num'' ???2????????? +???????????????"?4??? ABCD ????"?"? 123 +???"?????????PL/SQL????????????????? +???????????????????????????????? +???? + +!! parse(sql) +?????????sql ???????????[[OCI8::Cursor]] ???? +????????? + +!! describe_table(table_name) +(new in 1.0.0 without 'rc') + +[[api_OCI8MetadataTable]]???[[api_OCI8MetadataView]] +????????????????????? OCIError(Ora-04043) +?????????? + +!! commit() +????????????????? + + conn = OCI8.new("scott", "tiger") + conn.exec("UPDATE emp SET sal = sal * 1.1") # yahoo + conn.commit + conn.logoff + +!! rollback() +??????????????????? + + conn = OCI8.new("scott", "tiger") + conn.exec("UPDATE emp SET sal = sal * 0.9") # boos + conn.rollback + conn.logoff + +!! autocommit? +autocommit ?????????????????? false ????? +?? true ????INSERT/UPDATE/DELETE????????????? +????????? + +!! autocommit = boolean_value +autocommit ????????????? + + conn = OCI8.new("scott", "tiger") + conn.autocommit = true + ... do something ... + conn.logoff + +!! long_read_len +LONG ??LONG RAW ????????????????????????????????? +??????? 65535 ???ruby-oci8 1.0 ?????????????????? +???????? long_read_len ????????????????? +ruby-oci8 2.0 ??????????????????????????????? +???????????????????????? + +??: [[FAQ_long_or_long_raw]] + +!! long_read_len = size +long_read_len ??????????? + +??: [[FAQ_long_or_long_raw]] + +!! prefetch_rows = rows +change the prefetch rows size. This reduces network round trips +when fetching multiple rows. The default value is 1. + +!! non_blocking? +??????/????????????????????????? +false???????????????? + +!! non_blocking= boolean_value +??????/???????????????????? + +!! break +?????????? OCI ???????????????????? +??????????????????????????? Added: web/hiki_data/ja/text/api_OCI8BFILE =================================================================== --- web/hiki_data/ja/text/api_OCI8BFILE (rev 0) +++ web/hiki_data/ja/text/api_OCI8BFILE 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,3 @@ +???? +[[??????|http://ruby-oci8.rubyforge.org/en/api_OCI8BFILE.html]]???????? +[[????|http://www.jiubao.org/ruby-oci8/api.ja.html]]?? OCI8::BFILE ???????????? Added: web/hiki_data/ja/text/api_OCI8BLOB =================================================================== --- web/hiki_data/ja/text/api_OCI8BLOB (rev 0) +++ web/hiki_data/ja/text/api_OCI8BLOB 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,3 @@ +???? +[[??????|http://ruby-oci8.rubyforge.org/en/api.html]]? +[[????|http://www.jiubao.org/ruby-oci8/api.ja.html]]???????? Added: web/hiki_data/ja/text/api_OCI8CLOB =================================================================== --- web/hiki_data/ja/text/api_OCI8CLOB (rev 0) +++ web/hiki_data/ja/text/api_OCI8CLOB 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,107 @@ +CLOB ???????????????? I/O ?????? +CLOB ????????????????select ????????????? + + con = OCI8.new('scott', 'tiger') + # ??????? + con.exec("CREATE TABLE novels (title VARCHAR2(30), contents CLOB)") + # CLOB ????????? + con.exec("INSERT INTO novels(title, contents) values (:1, :2)", + 'a long tale', OCI8::CLOB.new(con, 'long long text ...')) + # CLOB ??????? select + con.exec("select contents from novels where title = :1", + 'a long tale') do |row| + # row[0] is a CLOB object. + contents = row[0].read + end + +! ??????? + +!! OCI8::CLOB.new(con, val) +(new in 1.0.0-rc2) + +?????LOB????????"?????(????)"????????????????????????????????LOB????????????????????????? + +! ?????????? + +!! available? +CLOB????????????????? + + con.exec("CREATE TABLE novels (title VARCHAR2(30), contents CLOB)") + con.exec("INSERT INTO novels VALUES ('null-data', NULL)") + con.exec("INSERT INTO novels VALUES ('empty-data', EMPTY_CLOB())") + con.exec("SELECT title, contents FROM novels") do |title, contents| + case title + when 'null-data' + puts "#{title} => #{contents.available?.to_s}" + # => false + when 'empty-data' + puts "#{title} => #{contents.available?.to_s}" + # => true + end + end + +!! read(size = nil) +CLOB ???????????????????????????? size ?????size ? nil ?????CLOB ???????????? + +???: size ????????????????????????????????????????????????? size ??????????????? + + # read CLOB data. + con.exec("SELECT title, contents FROM novels") do |title, contents| + File.open(title, 'w') do |f| + f.write(contents.read) + end + end + +!! write(string) +write the given string to CLOB. The return value is the number of written '''characters'''. +If old data is longer than new data, resize by OCI8::CLOB#size. + + # write to CLOB. + con.exec("SELECT title, contents FROM novels") do |title, clob| + File.open(title, 'r') do |f| + contents = f.read + num_chars = clob.write(contents) + clob.size = num_chars + end + end + +note: OCI8::CLOB#size is counted by characters. If the contents contain multibyte characters, the following code set incorrect clob size. + + # bad example + con.exec("SELECT title, contents FROM novels") do |title, clob| + File.open(title, 'r') do |f| + contents = f.read + clob.write(contents) + clob.size = contents.length # boo! + end + end + +!! size +return the number of characters in the CLOB. + +!! size=(len) +set the number of characters in the CLOB. + +!! pos +return the current offset of the CLOB in characters. + +!! pos = number +set the current offset of the CLOB in characters. + +!! eof? +true if the current offset is at the end of the CLOB. + +!! chunk_size +return the chunk size of CLOB. + +!! truncate(len) +synonym for size=. + +!! tell +synonym for pos. + +!! seek(pos) +synonym for pos=. + +!! rewind +set the current offset to zero. Added: web/hiki_data/ja/text/api_OCI8Cursor =================================================================== --- web/hiki_data/ja/text/api_OCI8Cursor (rev 0) +++ web/hiki_data/ja/text/api_OCI8Cursor 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,183 @@ +?????????????????????????????????JDBC +? java.sql.Statement, Perl/DBI ? statement handle: $sth ??????? + +????????????? new ???????????????? +''OCI8#exec'', ''OCI8#parse'' ???????????? + +! ?????????? + +!! define(pos, type, length = nil) +fetch ????????????????????parse ? exec ?? +??????????pos ? 1 ???????length ? type ? +String ????????????? + + cursor = conn.parse("SELECT ename, hiredate FROM emp") + cursor.define(1, String, 20) # 1????? String ??? fetch + cursor.define(2, Time) # 2????? Time ??? fetch + cursor.exec() + +!! bind_param(key, val, type = nil, length = nil) +??????????????? + +key ?????????????????????????????? +??1???????key ????????????????????? +????????? + + cursor = conn.parse("SELECT * FROM emp WHERE ename = :ename") + cursor.bind_param(1, 'SMITH') # bind by position + ...or... + cursor.bind_param(':ename', 'SMITH') # bind by name + +????????????Integer ? Fixnum ? Float ?????????Bignum +????????????? NULL ???????val ? nil ???? +type ?Fixnum ? Float ???????? + + cursor.bind_param(1, 1234) # bind as Fixnum, Initial value is 1234. + cursor.bind_param(1, 1234.0) # bind as Float, Initial value is 1234.0. + cursor.bind_param(1, nil, Fixnum) # bind as Fixnum, Initial value is NULL. + cursor.bind_param(1, nil, Float) # bind as Float, Initial value is NULL. + +?????????????val ????????????????? +???????????????????????????????? +????????????type ? String ??????? length ?? +???????? + + cursor = conn.parse("BEGIN :out := :in || '_OUT'; END;") + cursor.bind_param(':in', 'DATA') # bind as String with width 4. + cursor.bind_param(':out', nil, String, 7) # bind as String with width 7. + cursor.exec() + p cursor[':out'] # => 'DATA_OU' + # PL/SQL??????? :out ? 8???????7?????????? + # ???????7?????????? + +???? RAW ??????????????? type ? OCI8::RAW ? +????????? + + cursor = conn.parse("INSERT INTO raw_table(raw_column) VALUE (:1)") + cursor.bind_param(1, 'RAW_STRING', OCI8::RAW) + cursor.exec() + cursor.close() + +!! [key] +???????????????? + +?????????????#bind_param ????? key ??????????? +???????????????????????????????????? +??????? + + cursor = conn.parse("BEGIN :out := 'BAR'; END;") + cursor.bind_param(':out', 'FOO') # ??????? + p cursor[':out'] # => 'FOO' + p cursor[1] # => nil + cursor.exec() + p cursor[':out'] # => 'BAR' + p cursor[1] # => nil + + cursor = conn.parse("BEGIN :out := 'BAR'; END;") + cursor.bind_param(1, 'FOO') # ??????? + p cursor[':out'] # => nil + p cursor[1] # => 'FOO' + cursor.exec() + p cursor[':out'] # => nil + p cursor[1] # => 'BAR' + +OCI8#exec?OCI8::Cursor#exec ?????????????? +??????????????????????????1??????? + + cursor = conn.exec("BEGIN :out := 'BAR'; END;", 'FOO') + # ??????????????3? String ?????????????? 'FOO' ??? + # ????????????? 'BAR' ?????? + p cursor[1] # => 'BAR' + +!! [key] = val +???????????????key ?????? +''OCI8::Cursor#[]''????????????????????&?????? +?????????? + + cursor = conn.parse("INSERT INTO test(col1) VALUES(:1)") + cursor.bind_params(1, nil, String, 3) + ['FOO', 'BAR', 'BAZ'].each do |key| + cursor[1] = key + cursor.exec + end + cursor.close() + + ['FOO', 'BAR', 'BAZ'].each do |key| + conn.exec("INSERT INTO test(col1) VALUES(:1)", key) + end + +?????????????????????????????? + +!! keys +??????? key ??????????? + +!! exec(*bindvars) +??????????? SQL ???????SQL ? SELECT?? +INSERT/UPDATE/DELETE??CREATE/ALTER/DROP??PL/SQL??????? +??????????????? + +SELECT?????select-list ???????? + +INSERT/UPDATE/DELETE????????????????????? + +CREATE/ALTER/DROP??PL/SQL?????true ?????? +OCI8#exec ?? PL/SQL???????????????????? +???????????????? true ????????????? +?? OCI8::Cursor#[] ????????????????? + +!! type +QL???????????????????????? +* OCI8::STMT_SELECT +* OCI8::STMT_UPDATE +* OCI8::STMT_DELETE +* OCI8::STMT_INSERT +* OCI8::STMT_CREATE +* OCI8::STMT_DROP +* OCI8::STMT_ALTER +* OCI8::STMT_BEGIN +* OCI8::STMT_DECLARE +???????PL/SQL??????OCI8::STMT_BEGIN ? +OCI8::STMT_DECLARE ?????? + +ruby-oci8 1.0 ???? Fixnum ??? +ruby-oci8 2.0 ???? Symbol ?????? + +!! row_count +???????????? + +!! get_col_names +??????????????????exec ????????????? + +!! column_metadata +(new in 1.0.0 without rc) + +select??????????????? +OCI8#exec ??? OCI8::Cursor#exec ????? +??????????????????????? +[[api_OCI8MetadataColumn]]????????? + +!! fetch +????????????????????SELECT ????????? + + conn = OCI8.new('scott', 'tiger') + cursor = conn.exec('SELECT * FROM emp') + while r = cursor.fetch() + puts r.join(',') + end + cursor.close + conn.logoff + +!! fetch_hash +Hash ???????????????Hash ??????????? + +!! close +????????????? + +!! rowid +?????????? ROWID ??????? +???????????????????????? +????????????????????????? + +!! prefetch_rows = rows +?????????????????????? +???????????????????????? Added: web/hiki_data/ja/text/api_OCI8MetadataColumn =================================================================== --- web/hiki_data/ja/text/api_OCI8MetadataColumn (rev 0) +++ web/hiki_data/ja/text/api_OCI8MetadataColumn 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,136 @@ +???? + +(new in 1.0.0 without rc) + +! ??????? + +??????????? + +?????????????????????????? +* [[OCI8::Cursor#column_metadata]] +* [[OCI8::Metadata::Table#columns]] +* [[OCI8::Metadata::View#columns]] + +! ?????????? + +!! name +?? + +!! type_string +??????????? + + con = OCI8.new('username/password') + colinfo = con.describe_table('tab').columns + colinfo[0].type_string #=> "VARCHAR2(30) NOT NULL" + colinfo[1].type_string #=> "VARCHAR2(7)" + colinfo[2].type_string #=> "NUMBER" + +!! data_type +??????? Symbol ???? + +||!Oracle type||!data_type|| +||CHAR, NCHAR||:char|| +||VARCHAR2, NVARCHAR2||:varchar2|| +||RAW||:raw|| +||CLOB, NCLOB||:clob|| +||BLOB||:blob|| +||BFILE||:bfile|| +||NUMBER, FLOAT||:number|| +||BINARY_FLOAT||:binary_float|| +||BINARY_DOUBLE||:binary_double|| +||DATE||:date|| +||TIMESTAMP||:timestamp|| +||TIMESTAMP WITH TIME ZONE||:timestamp_tz|| +||TIMESTAMP WITH LOCAL TIME ZONE||:timestamp_ltz|| +||INTERVAL YEAR TO MONTH||:interval_ym|| +||INTERVAL DAY TO SECOND||:interval_ds|| + +!! charset_form +???????????(???????????) + +||!Oracle type||!char_form|| +||CHAR(n)||:implicit|| +||VARCHAR2(n)||:implicit|| +||CHAR(n CHAR)||:implicit|| +||VARCHAR2(n CHAR)||:implicit|| +||NCHAR(n)||:nchar|| +||NVARCHAR2(n)||:nchar|| +||Others||nil|| + +!! nullable? +NULL???????? true, ????? false + +!! char_used? +?????????????? true, ????? false. + +||!Oracle type||!char_used?|| +||CHAR(n)||false|| +||VARCHAR2(n)||false|| +||CHAR(n CHAR)||true|| +||VARCHAR2(n CHAR)||true|| +||NCHAR(n)||true|| +||NVARCHAR2(n)||true|| + +!! char_size +???????????char_used? ? true ?????????false ?????????? + +||!Oracle type||!char_size|| +||CHAR(n)||n|| +||VARCHAR2(n)||n|| +||CHAR(n CHAR)||n|| +||VARCHAR2(n CHAR)||n|| +||NCHAR(n)||n|| +||NVARCHAR2(n)||n|| + +!! data_size +??????????????? + +???????????????????????Oracle???????????????????? + +||!Oracle tyep||data_size|| +||CHAR(n), VARCHAR2(n)||n|| +||CHAR(n CHAR), VARCHAR2(n CHAR)||n ????(??????4?) || +||NCHAR(n), NVARCHAR2(n)||n ????(??????2?)|| +||NUMBER, FLOAT||22|| +||BINARY_FLOAT||4|| +||BINARY_DOUBLE||8|| +||DATE||7|| +||TIMESTAMP||11|| +||TIMESTAMP WITH TIME ZONE||13|| +||TIMESTAMP WITH LOCAL TIME ZONE||11|| + +!! precision +???????NUMBER ???10???????FLOAT???? 2???????FLOAT???? 0.30103 ?????NUMBER?????????????? 0 ??????????????????????? NUMBER ??????? + +||!Oracle type||!precision|| +||NUMBER||0|| +||NUMBER(n)||n|| +||NUMBER(m, n)||m|| +||FLOAT||126|| +||FLOAT(n)||n|| + +!! scale +?????????precision ? 0??? scale ? -127 ???? FLOAT?????? NUMBER? + +||!Oracle type||!scale|| +||NUMBER||-127 or 0|| +||NUMBER(n)||0|| +||NUMBER(m, n)||n|| +||FLOAT||-127|| +||FLOAT(n)||-127|| + +!! fsprecision +?????(fractional seconds precision) + +||!Oracle type||!fsprecision|| +||TIMEPTAMP(n)||n|| +||TIMESTAMP(n) WITH TIME ZONE||n|| +||TIMESTAMP(n) WITH LOCAL TIME ZONE||n|| +||INTERVAL DAY(m) TO SECOND(n)||n|| + +!! lfprecision +?????????(leading field precision) + +||!Oracle type||!lfprecision|| +||INTERVAL YEAR(n) TO MONTH||n|| +||INTERVAL DAY(m) TO SECOND(n)||m|| Added: web/hiki_data/ja/text/api_OCI8MetadataTable =================================================================== --- web/hiki_data/ja/text/api_OCI8MetadataTable (rev 0) +++ web/hiki_data/ja/text/api_OCI8MetadataTable 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,19 @@ +?????????? +(new in 1.0.0 without rc) + +????????????????????????? +* [[OCI8#describe_table(name)]] (name ?????????) + +! ?????????? + +!! obj_schema +????? + +!! obj_name +????? + +!! num_cols +?????? + +!! columns +[[api_OCI8MetadataColumn]]??? Added: web/hiki_data/ja/text/api_OCI8MetadataView =================================================================== --- web/hiki_data/ja/text/api_OCI8MetadataView (rev 0) +++ web/hiki_data/ja/text/api_OCI8MetadataView 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,19 @@ +????????? +(new in 1.0.0 without rc) + +????????????????????????? +* [[OCI8#describe_table(name)]] (name ????????) + +! ?????????? + +!! obj_schema +????? + +!! obj_name +???? + +!! num_cols +?????? + +!! columns +[[api_OCI8MetadataColumn]]??? Added: web/hiki_data/ja/text/dbd_oci8 =================================================================== --- web/hiki_data/ja/text/dbd_oci8 (rev 0) +++ web/hiki_data/ja/text/dbd_oci8 2008-10-18 07:17:34 UTC (rev 292) @@ -0,0 +1,140 @@ +DBD::OCI8 ? [[Ruby/DBI|http://ruby-dbi.rubyforge.org]] ??????????????? +DBI????????????????????? +* [[DBI_SPEC|http://ruby-dbi.rubyforge.org/DBI_SPEC.html]] ([[????|http://www.jiubao.org/ruby-dbi/DBI_SPEC.ja.html]]) +* [[Using the Ruby DBI Module|http://www.kitebird.com/articles/ruby-dbi.html]] ([[????|http://www.jiubao.org/ruby-dbi/ruby-dbi.html]]) +* [[?????????Web?????????????????????|http://www.nslabs.jp/book2.rhtml]] + +???? DBD::OCI8 ??????????????? + +!! ?????? + require 'dbi' + dbh = DBI.connect('DBI:OCI8:dbname', 'username', 'password') + +!! ?????? + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', 'username', 'password') + +!! sys?????? + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', 'sys', 'password_of_sys', {'Privilege' => :SYSDBA}) +??? + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', 'sys', 'password_of_sys', {'Privilege' => :SYSOPER}) + +!! OS?? + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', nil, nil) + +!! ?????????? + + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', 'username', 'password', {'NonBlocking' => true}) + +??????????????? SQL ???????? + +??: ???????????????????????????? + +!! ?????? + + require 'dbi' + dbh = DBI.connect('DBI:OCI8:', 'username', 'password') + sth = dbh.parse('INSERT INTO emp(ename, sal) VALUES (?, ?)') + sth.execute('FOOMAN', 100) + +!! ??????????? + + dbh = DBI.connect('DBI:OCI8:', 'username', 'password') + sth = dbh.prepare('SELECT SYSDATE FROM DUAL') + sth.func(:define, 1, Date) # fetch the 1st column as Date. + sth.execute() + +!! BLOB + +BLOB??????: + + image = open('SagradaFamilia.gif', "rb").read() + # BLOB???? 'EMPTY_BLOB()' ?????? + sth = dbh.prepare("INSERT INTO photos(name, image) VALUES (?, EMPTY_BLOB())") + sth.execute("Sagrada Familia") + # ??????? ROWID ???? + rowid = sth.func(:rowid) # call driver specific code. + # ?? BLOB ???? OCI8::BLOB ???????? + lob = dbh.select_one("SELECT image FROM photos WHERE ROWID = ?", rowid)[0] # 1st row, 1st column + # ????LOB?????? + lob.write(image) + +BLOB??????: + + new_image = open('SagradaFamilia.gif', "rb").read() + # BLOB???? OCI8::BLOB ?????????????????? 'FOR UPDATE' ????? + lob = dbh.select_one("SELECT image FROM photos WHERE name = ? FOR UPDATE", 'Sagrada familia')[0] + # OCI8::BLOB#write(data) ? LOB ?????????? + lob.write(new_image) + # OCI8::BLOB#truncate(data.size) ????????? + lob.truncate(new_image.size) + +BLOB??????: + # BLOB???? OCI8::BLOB ???????? + lob = dbh.select_one("SELECT image FROM photos WHERE name = ?", 'Sagrada familia')[0] + # OCI8::BLOB#read ?????????? + image = lob.read() + +BLOB??????: + # ?????? + dbh.do("DELETE FROM photos WHERE name = ?", 'Sagrada familia') + +!! CLOB + +CLOB??????: + + text = open('gutenberg.txt', "r").read() + # CLOB???? 'EMPTY_CLOB()' ?????? + sth = dbh.prepare("INSERT INTO books(title, content) VALUES (?, EMPTY_CLOB())") + sth.execute("Project Gutenberg") + # ??????? ROWID ???? + rowid = sth.func(:rowid) # call driver specific code. + # ?? CLOB ???? OCI8::CLOB ???????? + lob = dbh.select_one("SELECT content FROM books WHERE ROWID = ?", rowid)[0] # 1st row, 1st column + # ????LOB?????? + lob.write(text) + +CLOB??????: + new_text = open('gutenberg.txt', "r").read() + # CLOB???? OCI8::CLOB ?????????????????? 'FOR UPDATE' ????? + lob = dbh.select_one("SELECT content FROM books WHERE title = ? FOR UPDATE", 'Project Gutenberg')[0] + # OCI8::CLOB#write(data) ? LOB ?????????? + lob.write(new_text) + # OCI8::CLOB#truncate(OCI8::CLOB#pos) ????????? + # lob.truncate(new_text.size) ???????????new_text.size ??????? + # ????????#truncate ????????????? + lob.truncate(lob.pos) + +CLOB??????: + # CLOB???? OCI8::CLOB ???????? + lob = dbh.select_one("SELECT content FROM books WHERE title = ?", 'Project Gutenberg')[0] + # OCI8::CLOB#read ?????????? + text = lob.read() + +CLOB??????: + # ?????? + dbh.do("DELETE FROM books WHERE content = ?", 'Project Gutenberg') + +!! ??????? + + # DBMS_OUTPUT ??????? + dbh.do("BEGIN DBMS_OUTPUT.ENABLE; END;") + ... DBMS_OUTPUT.PUT_LINE ?????? ... + # DBMS_OUTPUT.GET_LINE ????? PUT_LINE ?????????? + dbh.prepare("BEGIN DBMS_OUTPUT.GET_LINE(?, ?); END;") do |sth| + # ??????????255??????????? + sth.bind_param(1, ' ' * 255) + # ????????????????? + sth.bind_param(2, 0) + while true + sth.execute + # ????????0??????????? + break if sth.func(:bind_value, 2) != 0 + # ????????????? + puts sth.func(:bind_value, 1) + end + end Modified: web/hiki_src/hiki/storage.rb =================================================================== --- web/hiki_src/hiki/storage.rb 2008-10-17 12:00:47 UTC (rev 291) +++ web/hiki_src/hiki/storage.rb 2008-10-18 07:17:34 UTC (rev 292) @@ -83,7 +83,12 @@ cache_path = "#{@conf.cache_path}/parser" Dir.mkdir( cache_path ) unless test( ?e, cache_path ) begin - tmp = Marshal::load( File.open( "#{cache_path}/#{CGI::escape( page )}".untaint, 'rb' ) {|f| f.read} ) + cache_file = "#{cache_path}/#{CGI::escape( page )}".untaint + page_file = textdir(page) + # return nil if the cache file is older than the page file. + return nil if File.mtime(cache_path) < File.mtime(page_file) + + tmp = Marshal::load( File.open( cache_file, 'rb' ) {|f| f.read} ) if tmp[0] == HIKI_RELEASE_DATE return tmp[1] else Modified: web/hiki_src/hiki.cgi =================================================================== --- web/hiki_src/hiki.cgi 2008-10-17 12:00:47 UTC (rev 291) +++ web/hiki_src/hiki.cgi 2008-10-18 07:17:34 UTC (rev 292) @@ -5,7 +5,7 @@ BEGIN { $defout.binmode } $SAFE = 1 -$KCODE = 'e' +$KCODE = 'u' begin if FileTest::symlink?( __FILE__ ) From nobody at rubyforge.org Sun Oct 19 09:12:45 2008 From: nobody at rubyforge.org (nobody at rubyforge.org) Date: Sun, 19 Oct 2008 09:12:45 -0400 (EDT) Subject: [ruby-oci8-commit] [293] web: * 01-run_webrick.rb, 02-make_html.rb, 03-copy_html.rb, config.rb : Message-ID: <20081019131245.79E2B18581A5@rubyforge.org> Revision: 293 Author: kubo Date: 2008-10-19 09:12:44 -0400 (Sun, 19 Oct 2008) Log Message: ----------- * 01-run_webrick.rb, 02-make_html.rb, 03-copy_html.rb, config.rb: add scripts to make and copy ruby-oci8 web pages. * doc_root/en/hikiconf.rb, doc_root/ja/hikiconf.rb: set page language by hikiconf.rb. * hiki_src/messages/fr.rb, hiki_src/messages/ja.rb, hiki_src/plugin/fr/00default.rb, hiki_src/plugin/it/00default.rb, hiki_src/plugin/ja/00default.rb, hiki_src/plugin/ja/01sp.rb, hiki_src/plugin/ja/02help.rb: change message encoding to utf-8. * hiki_src/template/view.html: change format of last modifine time to "yyyy-mm-dd hh:mi:ss UTC". * hiki_src/plugin/99ruby-oci8.rb, hiki_data/en/info.db, hiki_data/en/text/SideMenu, hiki_data/ja/info.db, hiki_data/ja/text/SideMenu: add a site search form to the side menu. Modified Paths: -------------- web/ChangeLog web/doc_root/en/hikiconf.rb web/doc_root/ja/hikiconf.rb web/hiki_data/en/info.db web/hiki_data/en/text/SideMenu web/hiki_data/ja/info.db web/hiki_data/ja/text/SideMenu web/hiki_src/messages/fr.rb web/hiki_src/messages/ja.rb web/hiki_src/plugin/99ruby-oci8.rb web/hiki_src/plugin/fr/00default.rb web/hiki_src/plugin/it/00default.rb web/hiki_src/plugin/ja/00default.rb web/hiki_src/plugin/ja/01sp.rb web/hiki_src/plugin/ja/02help.rb web/hiki_src/template/view.html Added Paths: ----------- web/01-run_webrick.rb web/02-make_html.rb web/03-copy_html.rb web/config.rb Added: web/01-run_webrick.rb =================================================================== --- web/01-run_webrick.rb (rev 0) +++ web/01-run_webrick.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -0,0 +1,36 @@ +#! /usr/bin/env ruby +require 'webrick' +require 'rbconfig' +include WEBrick + +base_dir = File.expand_path(File.dirname(__FILE__)) +load "#{base_dir}/config.rb" + +ruby_exe = File::join(::Config::CONFIG['bindir'], ::Config::CONFIG['ruby_install_name']) + +document_root = base_dir + '/doc_root' + +server = WEBrick::HTTPServer.new(:DocumentRoot => document_root, + :Port => $port, + :CGIInterpreter => ruby_exe + ) + +# customize CGIHandler to rewrite URL +class CustomCGIHandler < WEBrick::HTTPServlet::CGIHandler + alias :do_GET_orig :do_GET + + REWRITE_PATH_RE = /([a-zA-Z0-9_]+)\.html$/ + def do_GET(req, res) + if req.query_string.nil? and REWRITE_PATH_RE =~ req.path_info + req.query_string = $1 if $1 != 'index' + end + do_GET_orig(req, res) + end +end + +server.mount('/en/', CustomCGIHandler, document_root + '/en/hiki.cgi') +server.mount('/ja/', CustomCGIHandler, document_root + '/ja/hiki.cgi') + +trap('INT') { server.shutdown } +trap('TERM') { server.shutdown } +server.start Property changes on: web/01-run_webrick.rb ___________________________________________________________________ Name: svn:executable + * Added: web/02-make_html.rb =================================================================== --- web/02-make_html.rb (rev 0) +++ web/02-make_html.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -0,0 +1,53 @@ +#! /usr/bin/env ruby +base_dir = File.expand_path(File.dirname(__FILE__)) +$LOAD_PATH << base_dir + '/hiki_src' + +require 'fileutils' +require 'zlib' +require 'hiki/db/ptstore' +load "#{base_dir}/config.rb" + +html_dir = base_dir + '/html' + +ENV['LANG'] = 'C' + +cmd = %Q!wget -kmp -nH http://localhost:#{$port}/ -P "#{html_dir}"! +unless system(cmd) + puts "ERROR: wget" + exit(1) +end + +# make a file for google to verify site ownership +filename = "#{html_dir}/google1459048bfab15333.html" +File.exist?(filename) or FileUtils.touch(filename) + +# make sitemap.gz +f = Zlib::GzipWriter.open("#{html_dir}/sitemap.gz") +f.write(< + + + http://ruby-oci8.rubyforge.org/index.html + 0.0 + +EOS + +['en', 'ja'].each do |lang| + db = PTStore.new("#{base_dir}/hiki_data/#{lang}/info.db") + db.transaction(true) do + db.roots.each do |key| + last_mod = db[key][:last_modified].getgm + f.write(< + http://ruby-oci8.rubyforge.org]/#{lang}/#{key}.html + #{last_mod.strftime('%Y-%m-%dT%H:%M:%S+00:00')} + +EOS + end + end +end + +f.write(< +EOS +f.close Property changes on: web/02-make_html.rb ___________________________________________________________________ Name: svn:executable + * Added: web/03-copy_html.rb =================================================================== --- web/03-copy_html.rb (rev 0) +++ web/03-copy_html.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -0,0 +1,21 @@ +#! /usr/bin/env ruby +require 'cgi' +require 'net/http' + +base_dir = File.expand_path(File.dirname(__FILE__)) +html_dir = "#{base_dir}/html/" + +cmd = %Q!rsync -av --rsh=ssh "#{html_dir}" rubyforge.org:/var/www/gforge-projects/ruby-oci8! +unless system(cmd) + puts "ERROR: rsync" + exit(1) +end + +# submit the sitemap +sitemap_url = 'http://ruby-oci8.rubyforge.org/sitemap.gz' +ping_url = "http://www.google.com/webmasters/tools/ping?sitemap=#{CGI.escape(sitemap_url)}" +res = Net::HTTP.get_response(URI.parse(ping_url)) +unless res.is_a? Net::HTTPOK + puts "ERROR: Notifying google is failed." + exit(1) +end Property changes on: web/03-copy_html.rb ___________________________________________________________________ Name: svn:executable + * Modified: web/ChangeLog =================================================================== --- web/ChangeLog 2008-10-18 07:17:34 UTC (rev 292) +++ web/ChangeLog 2008-10-19 13:12:44 UTC (rev 293) @@ -1,3 +1,18 @@ +2008-10-19 KUBO Takehiro + * 01-run_webrick.rb, 02-make_html.rb, 03-copy_html.rb, config.rb: + add scripts to make and copy ruby-oci8 web pages. + * doc_root/en/hikiconf.rb, doc_root/ja/hikiconf.rb: + set page language by hikiconf.rb. + * hiki_src/messages/fr.rb, hiki_src/messages/ja.rb, + hiki_src/plugin/fr/00default.rb, hiki_src/plugin/it/00default.rb, + hiki_src/plugin/ja/00default.rb, hiki_src/plugin/ja/01sp.rb, + hiki_src/plugin/ja/02help.rb: change message encoding to utf-8. + * hiki_src/template/view.html: change format of last modifine time + to "yyyy-mm-dd hh:mi:ss UTC". + * hiki_src/plugin/99ruby-oci8.rb, hiki_data/en/info.db, + hiki_data/en/text/SideMenu, hiki_data/ja/info.db, + hiki_data/ja/text/SideMenu: add a site search form to the side menu. + 2008-10-18 KUBO Takehiro * doc_root/*: add document root of hiki pages. * hiki_data/*: add data directories of hiki pages. Added: web/config.rb =================================================================== --- web/config.rb (rev 0) +++ web/config.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -0,0 +1,2 @@ +# webrick port number +$port = 8001 Modified: web/doc_root/en/hikiconf.rb =================================================================== --- web/doc_root/en/hikiconf.rb 2008-10-18 07:17:34 UTC (rev 292) +++ web/doc_root/en/hikiconf.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -5,13 +5,13 @@ # Items which must be changed. #================================= -lang = 'en' + at lang = 'en' # Directory where data is stored (Necessary) # The directory where page contents or update time etc is stored. # It is recommended to specify where one can't access via WWW. # All of files and directories in this directory must be writable by WWW server. - at data_path = File.dirname(__FILE__) + "/../../hiki_data/#{lang}" + at data_path = File.dirname(__FILE__) + "/../../hiki_data/#{@lang}" # Mail server (Optional) # Specify name of the mail server. This may take effect when @mail_on_update is true. @@ -86,7 +86,7 @@ # # This is set automatically in most cases, but you should specify it # when it works wrong (for example, in case of a reverse proxy.) - at base_url = "http://#{ENV['SERVER_NAME']}:#{ENV['SERVER_PORT']}/#{lang}/" + at base_url = "http://#{ENV['SERVER_NAME']}:#{ENV['SERVER_PORT']}/#{@lang}/" # The cache directory (Optional) # Specify the directory for cache used by plugins. Modified: web/doc_root/ja/hikiconf.rb =================================================================== --- web/doc_root/ja/hikiconf.rb 2008-10-18 07:17:34 UTC (rev 292) +++ web/doc_root/ja/hikiconf.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -5,13 +5,13 @@ # Items which must be changed. #================================= -lang = 'ja' + at lang = 'ja' # Directory where data is stored (Necessary) # The directory where page contents or update time etc is stored. # It is recommended to specify where one can't access via WWW. # All of files and directories in this directory must be writable by WWW server. - at data_path = File.dirname(__FILE__) + "/../../hiki_data/#{lang}" + at data_path = File.dirname(__FILE__) + "/../../hiki_data/#{@lang}" # Mail server (Optional) # Specify name of the mail server. This may take effect when @mail_on_update is true. @@ -86,7 +86,7 @@ # # This is set automatically in most cases, but you should specify it # when it works wrong (for example, in case of a reverse proxy.) - at base_url = "http://#{ENV['SERVER_NAME']}:#{ENV['SERVER_PORT']}/#{lang}/" + at base_url = "http://#{ENV['SERVER_NAME']}:#{ENV['SERVER_PORT']}/#{@lang}/" # The cache directory (Optional) # Specify the directory for cache used by plugins. Modified: web/hiki_data/en/info.db =================================================================== --- web/hiki_data/en/info.db 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_data/en/info.db 2008-10-19 13:12:44 UTC (rev 293) @@ -161,7 +161,7 @@ :freeze => false, :keyword => [ ], -:last_modified => Time.at(1199075144), +:last_modified => Time.at(1224421827), :references => [ "FrontPage", "HowToInstall", @@ -182,6 +182,9 @@ "api_OCI8MetadataColumn", "dbd_oci8", "FAQ", +"FAQ_plsql_out_param", +"FAQ_long_or_long_raw", +"FAQ_uninstall", "dev_SourceCode", "dev_CodingStyle", "dev_APIWrap", Modified: web/hiki_data/en/text/SideMenu =================================================================== --- web/hiki_data/en/text/SideMenu 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_data/en/text/SideMenu 2008-10-19 13:12:44 UTC (rev 293) @@ -2,7 +2,7 @@ {{br}} [ English | {{link_to_japanese}} ] -'''This site is under construction.''' +{{search_by_google}} ! Site Map @@ -29,6 +29,9 @@ ** [[dbd_oci8]] * [[FAQ]] +** [[FAQ_plsql_out_param]] +** [[FAQ_long_or_long_raw]] +** [[FAQ_uninstall]] !! Note for Developers * [[dev_SourceCode]] Modified: web/hiki_data/ja/info.db =================================================================== --- web/hiki_data/ja/info.db 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_data/ja/info.db 2008-10-19 13:12:44 UTC (rev 293) @@ -160,7 +160,7 @@ :freeze => false, :keyword => [ ], -:last_modified => Time.at(1195826076), +:last_modified => Time.at(1224421807), :references => [ "FrontPage", "HowToInstall", @@ -181,6 +181,9 @@ "api_OCI8MetadataColumn", "dbd_oci8", "FAQ", +"FAQ_plsql_out_param", +"FAQ_long_or_long_raw", +"FAQ_uninstall", ], :title => "SideMenu", }, Modified: web/hiki_data/ja/text/SideMenu =================================================================== --- web/hiki_data/ja/text/SideMenu 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_data/ja/text/SideMenu 2008-10-19 13:12:44 UTC (rev 293) @@ -2,7 +2,7 @@ {{br}} [ {{link_to_english}} | Japanese ] -'''This site is under construction.''' +{{search_by_google}} ! ?????? @@ -29,3 +29,6 @@ ** [[dbd_oci8]] * [[FAQ]] +** [[FAQ_plsql_out_param]] +** [[FAQ_long_or_long_raw]] +** [[FAQ_uninstall]] Modified: web/hiki_src/messages/fr.rb =================================================================== --- web/hiki_src/messages/fr.rb 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_src/messages/fr.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -12,30 +12,30 @@ # module Hiki module Messages_fr - def msg_recent; 'Modifications r\xE9centes' end - def msg_create; 'Cr\xE9er' end - def msg_diff; 'Diff\xE9rences' end + def msg_recent; 'Modifications r?centes' end + def msg_create; 'Cr?er' end + def msg_diff; 'Diff?rences' end def msg_edit; 'Editer' end def msg_search; 'Chercher' end def msg_admin; 'Administration' end def msg_login; 'Login' end def msg_logout; 'Logout' end - def msg_search_result; 'R\xE9sultats de la recherche' end - def msg_search_hits; '\'%1$s\': %3$d page(s) trouv\xE9es dans %2$d pages.' end + def msg_search_result; 'R?sultats de la recherche' end + def msg_search_hits; '\'%1$s\': %3$d page(s) trouv?es dans %2$d pages.' end def msg_search_not_found; '\'%s\' introuvable.' end - def msg_search_comment; 'Rechercher sur le site entier. Ignore la casse. Hiki renvoie les pages contenant tous les mots de votre requ\xEAte.' end + def msg_search_comment; 'Rechercher sur le site entier. Ignore la casse. Hiki renvoie les pages contenant tous les mots de votre requ?te.' end def msg_frontpage; 'Accueil' end def msg_hitory; 'Historique' end def msg_index; 'Index' end def msg_recent_changes; 'Changements' end def msg_newpage; 'Nouveau' end - def msg_no_recent; '

Pas de donn\xE9es.

' end + def msg_no_recent; '

Pas de donn?es.

' end def msg_thanks; 'Merci.' end - def msg_save_conflict; 'Il y a eu des conflits lors de la mise-\xE0-jour. Vos modifications n\'ont pas \xE9t\xE9 sauv\xE9es. Sauvez temporairement vos modifications dans un \xE9diteur, rechargez la page et r\xE9-essayez l\'\xE9dition \xE0 nouveau.' end + def msg_save_conflict; 'Il y a eu des conflits lors de la mise-?-jour. Vos modifications n\'ont pas ?t? sauv?es. Sauvez temporairement vos modifications dans un ?diteur, rechargez la page et r?-essayez l\'?dition ? nouveau.' end def msg_time_format; "%Y-%m-%d #DAY# %H:%M:%S" end def msg_date_format; "%Y-%m-%d " end def msg_day; %w(Dimanche Lundi Mardi Mercredi Jeudi Vendredi Samedi) end - def msg_preview; 'Ceci est une pr\xE9visualisation de la page. Si tout est correct, veuillez confirmer en cliquant sur le bouton Sauver. ->Formulaire' end + def msg_preview; 'Ceci est une pr?visualisation de la page. Si tout est correct, veuillez confirmer en cliquant sur le bouton Sauver. ->Formulaire' end def msg_mail_on; 'Envoyer un e-mail de notification' end def msg_mail_off; 'Ne pas envoyer un e-mail de notification' end def msg_use; 'Utiliser' end @@ -45,37 +45,37 @@ def msg_name; 'Nom' end def msg_password; 'Mot de passe' end def msg_ok; 'OK' end - def msg_invalid_password; 'Mot de passe incorrect. Vos modifications n\'ont pas encore \xE9t\xE9 sauvegard\xE9es.' end - def msg_save_config; 'Modifications sauv\xE9es' end - def msg_freeze; 'Cette page est gel\xE9e. Vous avez besoin du mot de passe administrateur pour continuer.' end + def msg_invalid_password; 'Mot de passe incorrect. Vos modifications n\'ont pas encore ?t? sauvegard?es.' end + def msg_save_config; 'Modifications sauv?es' end + def msg_freeze; 'Cette page est gel?e. Vous avez besoin du mot de passe administrateur pour continuer.' end def msg_freeze_mark; '[Geler]' end - def msg_already_exist; 'Cette page a existe d\xE9j\xE0.' end - def msg_page_not_exist; 'Cette page n\'existe pas. Veuillez la remplir par vous-m\xEAme ;-)' end - def msg_invalid_filename(s); "Caract\xE8re invalide d\xE9tect\xE9, ou taille maximale d\xE9pass\xE9e (#{s} octets). Veuillez choisir un nouveau titre pour la page." end - def msg_delete; 'Supprim\xE9.' end - def msg_delete_page; 'Cette page est supprim\xE9e.' end + def msg_already_exist; 'Cette page a existe d?j?.' end + def msg_page_not_exist; 'Cette page n\'existe pas. Veuillez la remplir par vous-m?me ;-)' end + def msg_invalid_filename(s); "Caract?re invalide d?tect?, ou taille maximale d?pass?e (#{s} octets). Veuillez choisir un nouveau titre pour la page." end + def msg_delete; 'Supprim?.' end + def msg_delete_page; 'Cette page est supprim?e.' end def msg_follow_link; 'Cliquez sur le lien ci-dessous pour afficher votre page: ' end def msg_match_title; '[correspondance dans le titre]' end def msg_match_keyword; '[correspondance dans un mot clef]' end - def msg_duplicate_page_title; 'Une page portant le m\xEAme nom existe d\xE9j\xE0.' end + def msg_duplicate_page_title; 'Une page portant le m?me nom existe d?j?.' end def msg_missing_anchor_title; 'Create new %s and edit.' end # (config) def msg_config; 'Configuration du Hiki'; end # (diff) - def msg_diff_add; 'Les lignes ajout\xE9es sont affich\xE9es comme ceci.'; end - def msg_diff_del; 'Les lignes retir\xE9es sont affich\xE9es comme cela.'; end + def msg_diff_add; 'Les lignes ajout?es sont affich?es comme ceci.'; end + def msg_diff_del; 'Les lignes retir?es sont affich?es comme cela.'; end # (edit) def msg_title; 'Titre de la page'; end - def msg_keyword_form; 'Mot clef (veuillez entrer distinctement chaque mot sur une ligne \xE0 part)'; end + def msg_keyword_form; 'Mot clef (veuillez entrer distinctement chaque mot sur une ligne ? part)'; end def msg_freeze_checkbox; 'Geler la page courante.'; end - def msg_preview_button; 'Pr\xE9visualiser'; end + def msg_preview_button; 'Pr?visualiser'; end def msg_save; 'Sauver'; end def msg_update_timestamp; '(TRANSLATE PLEASE) Update timestamp'; end - def msg_latest; 'R\xE9f\xE9rencie version r\xE9cente'; end - def msg_rules; %Q|Consultez ReglesDeFormatageDuTexte si n\xE9cessaire.|; end + def msg_latest; 'R?f?rencie version r?cente'; end + def msg_rules; %Q|Consultez ReglesDeFormatageDuTexte si n?cessaire.|; end # (view) - def msg_last_modified; 'Derni\xE8re modification'; end + def msg_last_modified; 'Derni?re modification'; end def msg_keyword; 'Mots clef'; end - def msg_reference; 'R\xE9f\xE9rences'; end + def msg_reference; 'R?f?rences'; end end end Modified: web/hiki_src/messages/ja.rb =================================================================== --- web/hiki_src/messages/ja.rb 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_src/messages/ja.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -4,70 +4,70 @@ # the Ruby's licence. module Hiki module Messages_ja - def msg_recent; '\xB9\xB9\xBF\xB7\xCD\xFA\xCE\xF2' end - def msg_create; '\xBF\xB7\xB5\xAC\xBA\xEE\xC0\xAE' end - def msg_diff; '\xBA\xB9?' end - def msg_edit; '\xCA?\xB8' end - def msg_search; '\xB8\xA1\xBA\xF7' end - def msg_admin; '\xB4\xC9\xCD\xFD' end - def msg_login; '\xA5\x{D970}\xA5\xA4\xA5\xF3' end - def msg_logout; '\xA5\x{D970}\xA5\xA2\xA5\xA6\xA5\xC8' end - def msg_search_result; '\xB8\xA1\xBA\xF7\xB7\xEB\xB2\xCC' end - def msg_search_hits; '\'%s\'\xA4\xF2\xB4?\xE0\xA5?\xBC\xA5\xB8\xA4\xCF\xC1\xB4%d\xA5?\xBC\xA5\xB8\xC3?%d\xA5?\xBC\xA5\xB8\xB8\xAB\xA4?\xAB\xA4\xEA\xA4?\xB7\xA4\xBF\xA1\xA3' end - def msg_search_not_found; '\'%s\'\xA4\xF2\xB4?\xE0\xA5?\xBC\xA5\xB8\xA4?\xAB\xA4?\xAB\xA4\xEA\xA4?\xBB\xA4\xF3\xA4?\xB7\xA4\xBF\xA1\xA3' end - def msg_search_comment; '\xC1\xB4\xA4???\xBC\xA5\xB8\xA4\xAB\xA4\xE9?\xB8\xEC\xA4?\x{1E4DE4}?\xB9\xA1\xA3\xC2\xE7?\xBB\xFA\xA4?\xAE?\xBB\xFA\xA4?\xE8\xCA?\xB5\xA4\xEC\xA4?\xBB\xA4\xF3\xA1\xA3?\xB3?\xB9\xA5?\xBC\xA5\xB9\xA4\xC7?\xB8\xEC\xA4\xF2\xB6\xE8\xC0?\xEB\xA4?\xD8\xC4?\xA4\xBF?\xB8\xEC\xA4\xF2\xC1\xB4\xA4??\xE0\xA5?\xBC\xA5\xB8\xA4?\x{1E4DE4}?\xB9\xA1\xA3' end - def msg_frontpage; '\xA5??\xD7' end - def msg_hitory; '\xB9\xB9\xBF\xB7\xCD\xFA\xCE\xF2' end - def msg_index; '\xA5?\xBC\xA5\xB8\xB0\xEC\xCD\xF7' end - def msg_recent_changes; '\xB9\xB9\xBF\xB7\xCD\xFA\xCE\xF2' end - def msg_newpage; '\xBF\xB7\xB5\xAC' end - def msg_no_recent; '

\xB9\xB9\xBF\xB7\xBE\xF0\xCA\xF3\xA4\xAC?\xBA?\xB7\xA4?\xBB\xA4\xF3\xA1\xA3

' end - def msg_thanks; '\xB9\xB9\xBF\xB7\xA4\xA2\xA4?\xA4?\xA6\xA4\xB4\xA4\xB6\xA4\xA4\xA4?\xB7\xA4\xBF\xA1\xA3' end - def msg_save_conflict; '\xB9\xB9\xBF\xB7\xA4\xAC\xBE\xD7\xC6?\xB7\xA4?\xB7\xA4\xBF\xA1\xA3\xB2\xBC\xB5\xAD\xA4\xCE\xC6\xE2\xCD?\xF2\xA5?\xAD\xA5\xB9\xA5?\xA8\xA5?\xA3\xA5\xBF\xA4??\xCB\xCA\xDD?\xA4\xB7\xA1\xA2\xBA?\xB7\xA4??\xBC\xA5\xB8\xA4??\xE5\xA4?\xC6\xCA?\xB8\xA4\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3' end + def msg_recent; '????' end + def msg_create; '????' end + def msg_diff; '??' end + def msg_edit; '??' end + def msg_search; '??' end + def msg_admin; '??' end + def msg_login; '????' end + def msg_logout; '?????' end + def msg_search_result; '????' end + def msg_search_hits; '\'%s\'????????%d?????%d???????????' end + def msg_search_not_found; '\'%s\'??????????????????' end + def msg_search_comment; '????????????????????????????????????????????????????????????????????' end + def msg_frontpage; '???' end + def msg_hitory; '????' end + def msg_index; '?????' end + def msg_recent_changes; '????' end + def msg_newpage; '??' end + def msg_no_recent; '

????????????

' end + def msg_thanks; '??????????????' end + def msg_save_conflict; '????????????????????????????????????????????????????' end def msg_time_format; "%Y-%m-%d #DAY# %H:%M:%S" end def msg_date_format; "%Y-%m-%d " end - def msg_day; %w(\xC6\xFC \xB7\xEE \xB2\xD0 \xBF\xE5 \xCC\xDA \xB6\xE2 \xC5\xDA) end - def msg_preview; '\xB0?\xBC\xA4??\xEC\xA5??\xA4\xF2\xB3\xCE?\xA4\xB7\xA1\xA2\xCC\xE4\xC2?\xA4?\xB1\xA4\xEC\xA4??\xBC\xA5\xB8\xA4?\xBC\xA4?\xA2\xA4\xEB\xCA\xDD?\xA5?\xBF\xA5\xF3\xA4\xC7\xCA\xDD?\xA4\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4 \xA2\xAA\xCA?\xB8\xA5?\xA9\xA1\xBC\xA5\xE0' end - def msg_mail_on; '\xA5?\xA5\xEB\xA4\xC7\xC4\xCC\xC3\xCE' end - def msg_mail_off; '\xC8\xF3\xC4\xCC\xC3\xCE' end - def msg_use; '\xBB\xC8\xCD?\xB9\xA4\xEB' end - def msg_unuse; '\xBB\xC8\xCD?\xB7\xA4?\xA4' end - def msg_login_info; '\xB4\xC9\xCD\xFD\xBC??\xB7\xA4?\x{D970}\xA5\xA4\xA5?\xEB\xBA??\xA2\xA5?\xA5\xB6?\xA4\xCB admin \xA4\xC8\xC6\xFE\xCE?\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3' end - def msg_login_failure; '\xA5?\xA5\xB6?\xA4?\xBF\xA4??\xB9\xA5?\xA5?\xAC\xB4?\xE3\xA4??\xA4\xA4?\xB9\xA1\xA3' end - def msg_name; '\xA5?\xA5\xB6?' end - def msg_password; '\xA5?\xB9\xA5?\xA5\xC9' end + def msg_day; %w(? ? ? ? ? ? ?) end + def msg_preview; '?????????????????????????????????????????? ???????' end + def msg_mail_on; '??????' end + def msg_mail_off; '???' end + def msg_use; '????' end + def msg_unuse; '?????' end + def msg_login_info; '???????????????????? admin ??????????' end + def msg_login_failure; '?????????????????????' end + def msg_name; '????' end + def msg_password; '?????' end def msg_ok; 'OK' end - def msg_invalid_password; '\xA5?\xB9\xA5?\xA5?\xAC\xB4?\xE3\xA4??\xA4\xA4?\xB9\xA1\xA3\xA4?\xC0\xC0\xDF\xC4\xEA\xBE\xF0\xCA\xF3\xA4\xCF\xCA\xDD?\xA4\xB5\xA4\xEC\xA4?\xA4\xA4?\xBB\xA4\xF3\xA1\xA3' end - def msg_save_config; '\xC0\xDF\xC4\xEA\xA4\xF2\xCA\xDD?\xA4\xB7\xA4?\xB7\xA4\xBF\xA1\xA3' end - def msg_freeze; '\xA4\xB3\xA4??\xBC\xA5\xB8\xA4\xCF\xC5\xE0\xB7?\xA4\xEC\xA4?\xA4\xA4?\xB9\xA1\xA3\xCA\xDD?\xA4??\xC9\xCD\xFD\xBC\xD4\xCD???\xB9\xA5?\xA5?\xAC?\xCD??\xB9\xA1\xA3' end - def msg_freeze_mark; '\xA1\xDA\xC5\xE0\xB7\xEB\xA1\xDB' end - def msg_already_exist; '\xBB\xD8\xC4\xEA\xA4??\xBC\xA5\xB8\xA4?\xB9\xA4?\xCB?\xBA?\xB7\xA4?\xA4\xA4?\xB9\xA1\xA3' end - def msg_page_not_exist; '\xBB\xD8\xC4\xEA\xA4??\xBC\xA5\xB8\xA4\xCF?\xBA?\xB7\xA4?\xBB\xA4?\xBC\xA4?\xA2\xBA\xEE\xC0\xAE\xA4\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4:-)' end - def msg_invalid_filename(s); "\xC9\xD4\xC0\xB5\xA4\xCA?\xBB\xFA\xA4\xAC\xB4??\xEC\xA4?\xA4\xA4?\xA1\xA2\xBA\xC7\xC2\xE7?(#{s}\xA5?\xA4\xA5\xC8)\xA4\xF2?\xA4\xA8\xA4?\xA4\xA4?\xB9\xA1\xA3\xA5?\xBC\xA5\xB8?\xA4\xF2\xBD\xA4\xC0\xB5\xA4\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3" end - def msg_delete; '\xA5?\xBC\xA5\xB8\xA4\xF2\xBA\xEF\xBD\xFC\xA4\xB7\xA4?\xB7\xA4\xBF' end - def msg_delete_page; '\xB0?\xBC\xA4??\xBC\xA5\xB8\xA4\xF2\xBA\xEF\xBD\xFC\xA4\xB7\xA4?\xB7\xA4\xBF\xA1\xA3' end - def msg_follow_link; '\xB0?\xBC\xA4?\xEA\xA5?????\xAF\xA4\xC0\xA4\xB5\xA4\xA4: ' end - def msg_match_title; '[\xA5\xBF\xA5\xA4\xA5?\xEB\xA4?\xEC\xC3\xD7]' end - def msg_match_keyword; '[\xA5\xAD\xA1\xBC\xA5?\xA5??\xEC\xC3\xD7]' end - def msg_duplicate_page_title; '\xBB\xD8\xC4?\xA4\xBF\xA5\xBF\xA5\xA4\xA5?\xEB\xA4?\xFB\xA4\xCB?\xBA?\xB7\xA4?\xA4\xA4?\xB9\xA1\xA3' end - def msg_missing_anchor_title; '\xA5?\xBC\xA5\xB8 %s \xA4?\xAC\xBA\xEE\xC0\xAE\xA4\xB7\xA1\xA2\xCA?\xB8\xA4\xB7\xA4?\xB9\xA1\xA3' end + def msg_invalid_password; '???????????????????????????????' end + def msg_save_config; '??????????' end + def msg_freeze; '???????????????????????????????????' end + def msg_freeze_mark; '????' end + def msg_already_exist; '??????????????????' end + def msg_page_not_exist; '?????????????????????????:-)' end + def msg_invalid_filename(s); "?????????????????(#{s}???)??????????????????????" end + def msg_delete; '??????????' end + def msg_delete_page; '??????????????' end + def msg_follow_link; '???????????????: ' end + def msg_match_title; '[???????]' end + def msg_match_keyword; '[????????]' end + def msg_duplicate_page_title; '???????????????????' end + def msg_missing_anchor_title; '??? %s ?????????????' end # (config) - def msg_config; 'Hiki \xB4?\xAD\xC0\xDF\xC4\xEA'; end + def msg_config; 'Hiki ????'; end # (diff) - def msg_diff_add; '\xBA?\xE5\xA4?\xB9\xBF\xB7\xA4\xC7\xC4??\xB5\xA4?\xC9\xF4?\xA4\xCF\xA4\xB3\xA4??\xA4\xCB?\xBC\xA8\xA4\xB7\xA4?\xB9\xA1\xA3'; end - def msg_diff_del; '\xBA?\xE5\xA4?\xB9\xBF\xB7\xA4?\xEF\xBD\xFC\xA4\xB5\xA4?\xC9\xF4?\xA4\xCF\xA4\xB3\xA4??\xA4\xCB?\xBC\xA8\xA4\xB7\xA4?\xB9\xA1\xA3'; end + def msg_diff_add; '?????????????????????????'; end + def msg_diff_del; '?????????????????????????'; end # (edit) - def msg_title; '\xA5\xBF\xA5\xA4\xA5?\xEB'; end - def msg_keyword_form; '\xA5\xAD\xA1\xBC\xA5?\xA5\xC9(1\xB9?\xCB1\xA4?\xAD\xBD?\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4)'; end - def msg_freeze_checkbox; '\xA5?\xBC\xA5\xB8\xA4\xCE\xC5\xE0\xB7\xEB'; end - def msg_preview_button; '\xA5?\xEC\xA5??'; end - def msg_save; '\xCA\xDD?'; end - def msg_update_timestamp; '\xA5\xBF\xA5\xA4\xA5?\xA5\xBF\xA5\xF3\xA5??\xB7\xA4\xB9\xA4\xEB'; end - def msg_latest; '\xBA?\xB7\xC8??\xC8'; end - def msg_rules; %Q|\xBD\xF1\xA4\xAD\xCA\xFD\xA4\xAC\xA4?\xA4\xE9\xA4?\xA4\xBE\xEC\xB9\xE7\xA4\xCFTextFormattingRules\xA4??\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3|; end + def msg_title; '????'; end + def msg_keyword_form; '?????(1??1?????????)'; end + def msg_freeze_checkbox; '??????'; end + def msg_preview_button; '?????'; end + def msg_save; '??'; end + def msg_update_timestamp; '????????????'; end + def msg_latest; '??????'; end + def msg_rules; %Q|????????????TextFormattingRules??????????|; end # (view) - def msg_last_modified; '\xB9\xB9\xBF\xB7\xC6\xFC\xBB\xFE'; end - def msg_keyword; '\xA5\xAD\xA1\xBC\xA5?\xA5\xC9'; end - def msg_reference; '\xBB\xB2\xBE\xC8'; end + def msg_last_modified; '????'; end + def msg_keyword; '?????'; end + def msg_reference; '??'; end end end Modified: web/hiki_src/plugin/99ruby-oci8.rb =================================================================== --- web/hiki_src/plugin/99ruby-oci8.rb 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_src/plugin/99ruby-oci8.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -68,4 +68,28 @@ 'English' end -export_plugin_methods(:logo, :link_to_japanese, :link_to_english) +def search_by_google(size = '20') + case @conf.lang + when 'ja' + all_lang_msg = '???' + current_lang_msg = '?????' + submit_msg = 'Google???????' + else # 'en' + all_lang_msg = 'All languages' + current_lang_msg = 'English only' + submit_msg = 'Site Search by Google' + end + < + +
+ #{all_lang_msg} + #{current_lang_msg} + + + + +EOS +end + +export_plugin_methods(:logo, :link_to_japanese, :link_to_english, :search_by_google) Modified: web/hiki_src/plugin/fr/00default.rb =================================================================== --- web/hiki_src/plugin/fr/00default.rb 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_src/plugin/fr/00default.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -1,20 +1,20 @@ # # preferences (resources) # -add_conf_proc( 'default', 'Pr\xE9f\xE9rences de base' ) do +add_conf_proc( 'default', 'Pr?f?rences de base' ) do saveconf_default <<-HTML

Pseudonyme

-

Entrez votre nom d'utilisateur. Il appara\xEEtra comme \xE9l\xE9ment de titre.

+

Entrez votre nom d'utilisateur. Il appara?tra comme ?l?ment de titre.

Auteur

Entrez votre nom complet.

-

Adresse \xE9lectronique

+

Adresse ?lectronique

Entrez votre adresse e-mail.

Notification par e-mail.

-

Si cette option est activ\xE9e, un e-mail de notification sera envoy\xE9 \xE0 votre adresse \xE9lectronique via le serveur SMTP (d\xE9finit dans hikiconf.rb) lorsqu'une page est modifi\xE9e. Aucun e-mail ne sera envoy\xE9 si cette option est d\xE9sactiv\xE9e.

+

Si cette option est activ?e, un e-mail de notification sera envoy? ? votre adresse ?lectronique via le serveur SMTP (d?finit dans hikiconf.rb) lorsqu'une page est modifi?e. Aucun e-mail ne sera envoy? si cette option est d?sactiv?e.

HTML @conf_theme_list.each do |theme| @@ -51,14 +51,14 @@ end r << <<-HTML

-

Th\xE8me - URL

-

Entrez l'URL d'un th\xE8me.

+

Th?me - URL

+

Entrez l'URL d'un th?me.

-

Th\xE8me - R\xE9pertoire

-

Entrez le r\xE9pertoire du th\xE8me.

+

Th?me - R?pertoire

+

Entrez le r?pertoire du th?me.

Barre contextuelle

-

ON et la barre contextuelle sera affich\xE9e. Si vous voulez utiliser un th\xE8me qui ne g\xE8re pas de barre contextuelle, vous devez s\xE9lectionner OFF.

+

ON et la barre contextuelle sera affich?e. Si vous voulez utiliser un th?me qui ne g?re pas de barre contextuelle, vous devez s?lectionner OFF.

Liens automatiques

-

Choisissez ON si vous d\xE9sirez activer les liens automatiques.

+

Choisissez ON si vous d?sirez activer les liens automatiques.

Manda email per le modifiche.

-

Se \xE8 ABILITATO, l'email di notifica \xE8 inviata all'"Indirizzo email" delle preferenze di base via SMTP server(che \xE8 impostato in hikiconf.rb) quando una pagina \xE8 aggiornata. Se \xE8 DISABILITATO, l'email viene inviata.

+

Se ? ABILITATO, l'email di notifica ? inviata all'"Indirizzo email" delle preferenze di base via SMTP server(che ? impostato in hikiconf.rb) quando una pagina ? aggiornata. Se ? DISABILITATO, l'email viene inviata.

Barra laterale

-

ABILITATO se la barra laterale \xE8 mostrata. Se vuoi usare un tema che non supporta la barra laterale, devi selezionare DISABILITATO qui.

+

ABILITATO se la barra laterale ? mostrata. Se vuoi usare un tema che non supporta la barra laterale, devi selezionare DISABILITATO qui.

-

\xC3\xF8\xBC\xD4?

-

\xA4\xA2\xA4?\xBF\xA4\xCE?\xC1\xB0\xA4\xF2\xBB\xD8\xC4?\xA4?\xB9\xA1\xA3

+

???

+

?????????????

-

\xA5?\xA5?\xA5??

-

\xA4\xA2\xA4?\xBF\xA4??\xA5?\xA5??\xA4\xF2\xBB\xD8\xC4?\xA4?\xB9\xA1\xA31\xB9?\xCB1\xA5\xA2\xA5??\xA4\xBA\xA4?\xD8\xC4?\xA4?\xB9\xA1\xA3

+

???????

+

??????????????????1??1????????????

-

\xB9\xB9\xBF\xB7\xA4\xF2\xA5?\xA5\xEB\xA4\xC7\xC4\xCC\xC3\xCE

-

\xA5?\xBC\xA5\xB8\xA4?\xB9\xBF\xB7\xA4\xAC\xA4\xA2\xA4?\xBF\xBE\xEC\xB9\xE7\xA4??\xA5\xEB\xA4\xC7\xC4\xCC\xC3?\xB9\xA4?\xA4?\xA6\xA4\xAB\xA4\xF2\xBB\xD8\xC4?\xA4?\xB9\xA1\xA3\xA5?\xA5\xEB\xA4?\xF0\xCB\xDC\xC0\xDF\xC4\xEA\xA4?\xD8\xC4?\xA4\xBF\xA5\xA2\xA5??\xA4\xCB\xC1\x{1FFBA4}\xB5\xA4\xEC\xA4?\xB9\xA1\xA3\xA4\xA2\xA4?\xA4\xB8\xA4\xE1hikiconf.rb\xA4\xC7SMTP\xA5\xB5\xA1\xBC\xA5?\xF2\xC0\xDF\xC4?\xA4?\xAA\xA4\xA4\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3

+

?????????

+

??????????????????????????????????????????????????????????????hikiconf.rb?SMTP????????????????

HTML end -add_conf_proc( 'password', '\xA5?\xB9\xA5?\xA5\xC9' ) do - '

\xA5?\xB9\xA5?\xA5\xC9

' + +add_conf_proc( 'password', '?????' ) do + '

?????

' + case saveconf_password when :password_change_success - '

\xB4\xC9\xCD\xFD\xBC\xD4\xCD??\xB9\xA5?\xA5?\xF2\xCA?\xB9\xA4\xB7\xA4?\xB7\xA4\xBF\xA1\xA3

' + '

?????????????????

' when :password_change_failure - '

\xB4\xC9\xCD\xFD\xBC\xD4\xCD??\xB9\xA5?\xA5?\xAC\xB4?\xE3\xA4??\xA4\xA4?\xA1\xA2\xA5?\xB9\xA5?\xA5?\xAC\xB0\xEC\xC3?\xB7\xA4?\xBB\xA4\xF3\xA1\xA3

' + '

???????????????????????????????

' when nil - '

\xB4\xC9\xCD\xFD\xBC\xD4\xCD??\xB9\xA5?\xA5?\xF2\xCA?\xB9\xA4\xB7\xA4?\xB9\xA1\xA3

' + '

????????????????

' end + <<-HTML -

\xB8\xBD\xBA???\xB9\xA5?\xA5\xC9:

-

\xBF\xB7\xA4\xB7\xA4\xA4\xA5?\xB9\xA5?\xA5\xC9:

-

\xBF\xB7\xA4\xB7\xA4\xA4\xA5?\xB9\xA5?\xA5??\xCE?\xCD??\xC6\xC6\xFE\xCE?\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xCB:

+

????????:

+

????????:

+

???????????????????????:

HTML end -add_conf_proc( 'theme', '?\xBC\xA8\xC0\xDF\xC4\xEA' ) do +add_conf_proc( 'theme', '????' ) do saveconf_theme r = <<-HTML -

\xA5?\xBC\xA5??\xD8\xC4\xEA

-

?\xBC\xA8\xA4?\xC8\xCD?\xB9\xA4\xEB\xA5?\xBC\xA5?\xF2\xC1\xAA\xC2??\xA4?\xAC\xA4?\xAD\xA4?\xB9\xA1\xA3

+

??????

+

???????????????????????

-

\xA5?\xBC\xA5\xDEURL\xA4?\xD8\xC4\xEA

-

\xA5?\xBC\xA5?\xAC\xA4\xA2\xA4\xEBURL\xA4\xF2\xBB\xD8\xC4?\xA4?\xA4?\xAC\xA4?\xAD\xA4?\xB9\xA1\xA3?\xC0\xDCCSS\xA4\xF2\xBB\xD8\xC4?\xA4\xBF\xBE\xEC\xB9?\xBE\xE5\xA4???\xBC\xA5??\xD8\xC4\xEA\xA1?\xC7\xC1\xAA\xC2?\xBF\xA5?\xBC\xA5?\xCF?\xBB?\xA4?\xBB\xD8\xC4?\xA4\xBFCSS\xA4\xAC\xBB?\xEF\xA4\xEC\xA4?\xB9\xA1\xA3

+

???URL???

+

??????URL???????????????CSS????????????????????????????????????CSS???????

-

\xA5?\xBC\xA5??\xA3\xA5?\xA5?\xEA\xA4?\xD8\xC4\xEA

-

\xA5?\xBC\xA5?\xAC\xA4\xA2\xA4\xEB\xA5?\xA3\xA5?\xA5?\xEA\xA4\xF2\xBB\xD8\xC4?\xA4?\xA4?\xAC\xA4?\xAD\xA4?\xB9\xA1\xA3\xA1\xCA?\xBF\xF4\xC0\xDF\xC3?\xFE\xA4?\xC8\xCD?\xCB

+

????????????

+

???????????????????????????????????

-

\xA5\xB5\xA5\xA4\xA5??\xBC\xA4\xCE\xCD\xF8\xCD\xD1

-

\xA5?\xBC\xA5??\xE8\xA4???\xB5\xA5\xA4\xA5??\xBC\xA4\xF2\xCD\xF8\xCD?\xB9\xA4\xEB\xA4\xC8?\xBC\xA8\xA4\xAC\xCD\xF0\xA4\xEC\xA4\xEB\xA4\xE2\xA4?\xAC\xA4\xA2\xA4\xEA\xA4?\xB9\xA1\xA3\xA4\xBD\xA4?\xEC\xB9?\xA5\xB5\xA5\xA4\xA5??\xBC\xA4\xCE?\xBC\xA8\xA4???\xB9\xA4?\xA4?\xAC\xA4?\xAD\xA4?\xB9\xA1\xA3

+

????????

+

????????????????????????????????????????????????????????????

-

\xA5?\xA5??\xA4?\xAF\xA5??(CSS)\xA4?\xD8\xC4\xEA

-

\xA5??\xA9\xA5\xEB\xA5??\xCF\xCB\xDC?\xC9\xF4?\xA4?\xAF\xA5??\xA4?\xB7\xA4\xC6'main'\xA4\xF2\xBB\xC8\xCD?\xB7\xA4?\xB9\xA4\xAC\xA1\xA2\xA4\xBD\xA4\xEC\xB0?\xB0\xA4?\xAF\xA5??\xA4\xF2\xBB\xC8\xCD?\xB7\xA4\xBF\xA4\xA4\xBE\xEC\xB9\xE7\xA4?\xD8\xC4?\xA4?\xB9\xA1\xA3

+

???????????(CSS)???

+

???????????????????'main'????????????????????????????????

-

\xA5\xB5\xA5\xA4\xA5??\xBC\xA4?\xAF\xA5??(CSS)\xA4?\xD8\xC4\xEA

-

\xA5??\xA9\xA5\xEB\xA5???\xB5\xA5\xA4\xA5??\xBC\xA4?\xAF\xA5??\xA4?\xB7\xA4\xC6'sidebar'\xA4\xF2\xBB\xC8\xCD?\xB7\xA4?\xB9\xA4\xAC\xA1\xA2\xA4\xBD\xA4\xEC\xB0?\xB0\xA4?\xAF\xA5??\xA4\xF2\xBB\xC8\xCD?\xB7\xA4\xBF\xA4\xA4\xBE\xEC\xB9\xE7\xA4?\xD8\xC4?\xA4?\xB9\xA1\xA3

+

??????????(CSS)???

+

????????????????????'sidebar'????????????????????????????????

-

\xA5\xAA\xA1\xBC\xA5?\xEA\xA5?\xCE\xCD\xF8\xCD\xD1

-

\xB4\xFB?\xA4??\xBC\xA5\xB8\xA4?\xAB??\xA4?\xEA\xA5?\xF2\xC0\xDF\xC4?\xA4?\xA1\xBC\xA5?\xEA\xA5?\xA1?\xA4\xF2\xBB\xC8\xCD?\xB9\xA4?\xA4?\xA6\xA4\xAB\xBB\xD8\xC4?\xA4?\xB9\xA1\xA3

+

?????????

+

??????????????????????????????????????????

-

WikiName \xA4?\xE8\xA4\xEB\xA5\xEA\xA5?\xA1?\xA4\xCE\xCD\xF8\xCD\xD1

-

WikiName \xA4?\xE8\xA4\xEB\xA5\xEA\xA5?\xA1?\xA4\xF2\xBB\xC8\xCD?\xB9\xA4?\xA4?\xA6\xA4\xAB\xBB\xD8\xC4?\xA4?\xB9\xA1\xA3

+

WikiName ???????????

+

WikiName ???????????????????????

HTML end @@ -89,10 +89,10 @@ <<-HTML

XML-RPC

-

XML-RPC \xA5\xA4\xA5??\xA7\xA5\xA4\xA5\xB9\xA4\xF2?\xB8\xFA\xA4?\xB9\xA4?\xA4?\xA6\xA4\xAB\xA4\xF2\xBB\xD8\xC4?\xA4?\xB9\xA1\xA3

+

XML-RPC ????????????????????????

HTML end Modified: web/hiki_src/plugin/ja/01sp.rb =================================================================== --- web/hiki_src/plugin/ja/01sp.rb 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_src/plugin/ja/01sp.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -1,46 +1,46 @@ # Japanese resources of 01sp.rb $Revision: 1.1 $ =begin -= \xA5??\xA5\xA4\xA5\xF3\xC1\xAA\xC2\xF2\xA5??\xA5\xA4\xA5\xF3((-$Id: 01sp.rb,v 1.1 2005/01/29 03:34:40 fdiary Exp $-)) += ????????????((-$Id: 01sp.rb,v 1.1 2005/01/29 03:34:40 fdiary Exp $-)) Please see below for an English description. -== \xB3\xB5\xCD\xD7 -\xA4????\xA5\xA4\xA5\xF3\xA4\xF2\xBB?\xA6\xA4?\xAB\xC1\xAA\xA4??\xB9 +== ?? +???????????????? -\xA4\xB3\xA4???\xA5\xA4\xA5\xF3\xA4\xCF00defaults.rb\xA4?\xA1\xA4\xCB\xC6???\xA4\xB3\xA4???\xA5\xA4\xA5??\xAB\xA4\xE9\xC1\xAA\xC2\xF2\xB2\xC4 -?\xA4???\xA5\xA4\xA5\xF3\xA4\xAC\xC6??\xEC\xA4?\xB9\xA1\xA3\xA4\xBD\xA4?\xE5\xA4???\xA9\xA5\xEB\xA5???\xB9\xA4?\xA2\xA4\xEB\xA5??\xA5\xA4\xA5\xF3\xA4\xAC\xC6\xC9 -\xA4?\xFE\xA4?\xEC\xA4?\xB9\xA4??\xA2?\xA4\xB8\xA5?\xA5??\xF2\xC4\xEA\xB5\xC1\xA4\xB7\xA4?\xA4\xA4\xEB\xBE\xEC\xB9\xE7\xA4??\xA2\xA5??\xA9\xA5\xEB\xA5???\xB9\xA4\xCE -\xA4\xE2\xA4?\xAC?\xB8\xFA\xA4??\xEA\xA4?\xB9\xA1\xA3 +????????00defaults.rb????????????????????? +???????????????????????????????????? +???????????????????????????????????? +??????????? -== \xBB?\xA4\xCA\xFD -\xA4\xB3\xA4???\xA5\xA4\xA5\xF3\xA4\xF2plugin/\xA5?\xA3\xA5?\xA5?\xEA\xA4\xCB\xC7\xDB\xC3?\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3 +== ??? +????????plugin/???????????????? -\xA4?\xBF\xA1\xA200defaults.rb\xA4?\xA4???\xA5\xA4\xA5\xF3\xA4??\xA2\xC0\xE4\xC2?\xCB?\xCD????\xA5\xA4\xA5\xF3\xB0?\xB0\xA4?\xA2 -http\xA5\xB5\xA1\xBC\xA5?\xBC\xA4\xAB\xA4?\xA4\xE9\xA4\xEC\xA4\xEB\xCA???\xA3\xA5?\xA5?\xEA\xA4??\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3\xB0?\xBC\xA4\xCE\xCE\xE3\xA4??\xA2 -plugin\xA5?\xA3\xA5?\xA5?\xEA\xA4?\xBC\xA4\xCBselectable\xA4?\xA4\xA4\xA6\xA5?\xA3\xA5?\xA5?\xEA\xA4\xF2\xBA\xEE\xA4??\xA4\xA4?\xB9\xA1\xA3 +???00defaults.rb?????????????????????????? +http?????????????????????????????????? +plugin?????????selectable????????????????? -\xBA?\xE5\xA4?\xA2tdiary.rb\xA4\xC8?\xA4\xB8\xBE\xEC\xBD\xEA\xA4?\xA2\xA4\xEBtdiary.conf\xA4?\xA2 +????tdiary.rb????????tdiary.conf?? @options['sp.path'] = 'misc/plugin' -\xA4???\xA2\xC1\xAA\xC2\xF2\xA4?\xAD\xA4\xEB\xA5??\xA5\xA4\xA5\xF3\xA4?\xA2\xA4\xEB\xA5?\xA3\xA5?\xA5?\xEA\xA4\xF2tdiary.rb\xA4?\xA2\xA4\xEB\xA5?\xA3\xA5? -\xA5??\xA4\xE9\xA4\xCE\xC1\xEA\xC2??\xB9\xA4\xAB\xC0\xE4\xC2??\xB9\xA4?\xD8\xC4?\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3 +????????????????????????tdiary.rb??????? +???????????????????????? -secure==true\xA4\xCA\xC6\xFC\xB5\xAD\xA4?\xE2\xBB?\xA8\xA4?\xB9\xA1\xA3 +secure==true?????????? -== \xA5\xAA\xA5?\xB7\xA5\xE7\xA5\xF3 +== ????? :@options['sp.path'] - 'plugin/selectable'\xA4???\xA2\xC1\xAA\xC2\xF2\xA4?\xAD\xA4\xEB\xA5??\xA5\xA4\xA5\xF3\xA4?\xA2\xA4\xEB\xA5?\xA3\xA5?\xA5?\xEA\xA4\xF2\xA1\xA2 - tdiary.rb\xA4?\xA2\xA4\xEB\xA5?\xA3\xA5?\xA5??\xA4\xE9\xA4\xCE\xC1\xEA\xC2??\xB9\xA4\xAB\xC0\xE4\xC2??\xB9\xA4?\xD8\xC4?\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3 + 'plugin/selectable'????????????????????????? + tdiary.rb??????????????????????????????? :@options['sp.usenew'] - \xBF\xB7\xA4\xB7\xA4\xAF\xA5\xA4\xA5??\xBC\xA5?\xA4?\xA5??\xA5\xA4\xA5\xF3\xA4\xF2\xA5??\xA9\xA5\xEB\xA5???\xA6\xA4?\xA4?\xB9\xA4\xEB\xBE\xEC\xB9\xE7\xA4\xCF - true\xA4\xCB\xC0\xDF\xC4?\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3\xBF\xB7\xA4\xB7\xA4\xAF\xA5\xA4\xA5??\xBC\xA5?\xA4?\xA5??\xA5\xA4\xA5\xF3\xA4??\xB9\xA4\xEB\xA4\xCE - \xA4?\xA2\xBC\xA1\xA4???\xA5\xA4\xA5\xF3\xA4\xAC\xC1\xAA\xC2?\xEC\xA4\xEB\xBB\xFE\xA4?\xB9\xA1\xA3 + ?????????????????????????????????? + true????????????????????????????????? + ??????????????????? == TODO -\xC1\xAA\xC2?\xEC\xA4?\xA4\xA4\xBF\xA5??\xA5\xA4\xA5???\xA4?\xBB\xFE\xA4??\xA6\xA4\xB9\xA4?\xA1\xA3\xB8\xBD\xBA??\xC2\xC1\xF5\xA4??\xA2\xA5?\xE9 -\xA5\xB0\xA5\xA4\xA5\xF3\xC6??\xFE\xA4?\xFE\xA4?\xCF?\xBB?\xA4?\xA2\xBC\xA1\xA4\xCB\xC1\xAA\xC2\xF2\xA4??\xAA\xA4\xB7\xA4\xBF\xBB\xFE\xA4??\xA8\xA4? +???????????????????????????????????? +??????????????????????????????? -== \xC3\xF8\xBA?\xA4??\xA4\xA4\xC6 (Copyright notice) +== ??????? (Copyright notice) Copyright (C) 2003 zunda Permission is granted for use, copying, modification, distribution, and @@ -49,10 +49,10 @@ =end - at sp_label = '\xA5??\xA5\xA4\xA5\xF3\xC1\xAA\xC2\xF2' - at sp_label_description = '

\xA4????\xA5\xA4\xA5\xF3\xA4\xF2\xBB?\xA6\xA4\xAB\xC1\xAA\xC2??\xB9\xA1\xA3

' - at sp_label_please_select = '

?\xB8\xFA\xA4?\xB7\xA4\xBF\xA4\xA4\xA5??\xA5\xA4\xA5\xF3\xA4?\xC1\xA5\xA7\xA5?\xAF\xA4\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA1\xA3\xA5??\xA5\xA4\xA5\xF3\xA4??\xA1\xA5\xA4\xA5\xEB?\xA4?\xEA\xA5?\xAF\xA4\xB9\xA4\xEB\xA4??\xAD\xA5\xE5\xA5\xE1\xA5\xF3\xA5?\xAC\xB8\xAB\xA4\xE9\xA4\xEC\xA4?\xA4?\xA4\xEC\xA4?\xBB\xA4?\xBC\xA4\xD2\xC4??\xA6\xCA?\xB8\xA4\xB7\xA4?\xAF\xA4\xC0\xA4\xB5\xA4\xA4\xA4?\xA3

' - at sp_label_new = '

\xBF\xB7\xC6\xFE\xB2?\xAA\xA4\xAA\xBB?\xA4\xAF\xA4\xC0\xA4\xB5\xA4\xA4

' - at sp_label_used = '

\xBB\xC8\xCD\xD1\xC3\xE6

' - at sp_label_notused = '

\xB5?\xC6\xC3\xE6

' - at sp_label_noplugin = '

\xC1\xAA\xC2\xF2\xB2\xC4?\xA4???\xA5\xA4\xA5\xF3\xA4?\xA2\xA4\xEA\xA4?\xBB\xA4\xF3\xA1\xA3

' + at sp_label = '???????' + at sp_label_description = '

?????????????????

' + at sp_label_please_select = '

????????????????????????????????????????????????????????????????????????????

' + at sp_label_new = '

???????????

' + at sp_label_used = '

???

' + at sp_label_notused = '

???

' + at sp_label_noplugin = '

?????????????????

' Modified: web/hiki_src/plugin/ja/02help.rb =================================================================== --- web/hiki_src/plugin/ja/02help.rb 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_src/plugin/ja/02help.rb 2008-10-19 13:12:44 UTC (rev 293) @@ -1,53 +1,53 @@ def help_lineshelp_label - '\xB9??\xE7' + '???' end def help_wordshelp_label - '?\xBB\xFA\xBB?\xE7' + '????' end def help_tablehelp_label - '?\xBB?\xE7' + '???' end def help_pluginhelp_label - '\xA5??\xA5\xA4\xA5\xF3\xBB?\xE7' + '???????' end def help_mathhelp_label - '\xBF\x{13CC3B}?\xE7' + '????' end def help_heading_label - '\xB8\xAB\xBD?\xB7' + '???' end def help_list_label - '\xB2?\xF2\xBD\xF1' + '???' end def help_numbered_label - '\xC8?\xE6\xC9\xD5' + '???' end def help_preformatted_label - '\xC0\xB0\xB7\xC1\xBA\xD1' + '???' end def help_quotation_label - '\xB0\xFA\xCD\xD1' + '??' end def help_comment_label - '\xA5\xB3\xA5\xE1\xA5\xF3\xA5\xC8' + '????' end def help_cancel_label - '\xB2\xF2\xBD\xFC' + '??' end def help_link_label - '\xA5\xEA\xA5\xF3\xA5\xAF' + '???' end def help_url_label @@ -55,65 +55,65 @@ end def help_emphasized_label - '\xB6\xAF?' + '??' end def help_strongly_label - '\xA4\xB5\xA4\xE9\xA4\xCB' + '???' end def help_struckout_label - '\xBC\xE8\xBE\xC3\xC0\xFE' + '???' end def help_definition_label - '\xCD?\xEC\xB2\xF2\xC0\xE2' + '????' end def help_horizontal_label - '\xBF\xE5?\xC0\xFE' + '???' end def help_cell_label - '\xA5\xBB\xA5\xEB' + '??' end def help_headingcell_label - '\xB8\xAB\xBD?\xB7' + '???' end def help_rows_label - '\xBD\xC4?\xB7\xEB' + '???' end def help_columns_label - '\xB2\xA3?\xB7\xEB' + '???' end def help_plugin_label - '\xA5??\xA5\xA4\xA5\xF3' + '?????' end def help_br_label - '\xB2\xFE\xB9\xD4' + '??' end def help_toc_label - '\xCC?\xA1' + '??' end def help_tochere_label - '\xA4\xB3\xA4\xB3\xA4\xCB' + '???' end def help_recent_label - '\xBA?\xE1' + '??' end def help_display_label - '\xA5?\xA3\xA5\xB9\xA5??' + '??????' end def help_inline_label - '\xA5\xA4\xA5\xF3\xA5?\xA5\xF3' + '?????' end Modified: web/hiki_src/template/view.html =================================================================== --- web/hiki_src/template/view.html 2008-10-18 07:17:34 UTC (rev 292) +++ web/hiki_src/template/view.html 2008-10-19 13:12:44 UTC (rev 293) @@ -16,7 +16,7 @@
- <%=@conf.msg_last_modified%>:<%= @contents[:last_modified].strftime('%Y/%m/%d %H:%M:%S') %>
+ <%=@conf.msg_last_modified%>:<%= @contents[:last_modified].getgm.strftime('%Y-%m-%d %H:%M:%S UTC') %>
<%=@conf.msg_keyword%>:<%= @contents[:keyword] %>
<%=@conf.msg_reference%>:<%= @contents[:references] %>
<% unless @contents[:page_attribute].empty? %>
<%= @contents[:page_attribute] %>
<% end %>