[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] ruby-oci8 1.0.1

KUBO Takehiro

4/27/2008 1:58:00 PM

ruby-oci8 1.0.1 is released. This is a Oracle module using OCI8 API.

http://rubyforge.org/projects/...

ruby-oci8-unstalbe 2.0-svn-262 is also released.
This will be ruby-oci8 2.0 in future. Many features are added.
Some of them are contributed by Oracle Corporation.
Excuse me for not writing changes between 1.0 and 2.0.

What's new in ruby-oci8 1.0.1.

1. [SPEC CHANGE] OCI8#exec and OCI8::Cursor#exec's return value is changed
for statement except select, insert, update and delete statement.

It had been true. But now it is the number of rows processed for all
non-select statements.

For example:

# 1.0.0 or before
conn = OCI8.new('user/pass')
conn.exec('rename FOO_TABLE to BAR_TABLE') # => true

# 1.0.1
conn = OCI8.new('user/pass')
conn.exec('rename FOO_TABLE to BAR_TABLE') # => 0

2. fix a bug that OraDate.new made a core dump on x86_64 linux.
(reported by Alun Eyre)

3. fix OCI8#non_blocking = false problem.
Once the connection became non-bocking mode, it could
not be reset to blocking mode. Now it can be reset.
(reported by Cagdas Gerede)

4. support cursors in a result set.
(contributed by Randy Gordon)

For example:
conn = OCI8.new('ruby/oci8')
sql = 'SELECT CURSOR(SELECT * FROM foo where foo.c1 = bar.c1 ) FROM bar'
conn.exec(sql) do |row|
cursor_in_result_set = row[0]
cursor_in_result_set.fetch do |row|
puts row.join(',')
end
end

5. fix oraconf.rb for official x86_64 linux rpms.
(contributed by Pat)

4 Answers

Jesse Hu

4/28/2008 3:18:00 AM

0

[Note: parts of this message were removed to make it a legal post.]

Thanks Kubo.

5. fix oraconf.rb for official x86_64 linux rpms.
> (contributed by Pat)
>

And is the official i386/x86_64 linux Ruby-OCI8 rpms available?


2008/4/27 KUBO Takehiro <kubo@jiubao.org>:

> ruby-oci8 1.0.1 is released. This is a Oracle module using OCI8 API.
>
> http://rubyforge.org/projects/...
>
> ruby-oci8-unstalbe 2.0-svn-262 is also released.
> This will be ruby-oci8 2.0 in future. Many features are added.
> Some of them are contributed by Oracle Corporation.
> Excuse me for not writing changes between 1.0 and 2.0.
>
> What's new in ruby-oci8 1.0.1.
>
> 1. [SPEC CHANGE] OCI8#exec and OCI8::Cursor#exec's return value is changed
> for statement except select, insert, update and delete statement.
>
> It had been true. But now it is the number of rows processed for all
> non-select statements.
>
> For example:
>
> # 1.0.0 or before
> conn = OCI8.new('user/pass')
> conn.exec('rename FOO_TABLE to BAR_TABLE') # => true
>
> # 1.0.1
> conn = OCI8.new('user/pass')
> conn.exec('rename FOO_TABLE to BAR_TABLE') # => 0
>
> 2. fix a bug that OraDate.new made a core dump on x86_64 linux.
> (reported by Alun Eyre)
>
> 3. fix OCI8#non_blocking = false problem.
> Once the connection became non-bocking mode, it could
> not be reset to blocking mode. Now it can be reset.
> (reported by Cagdas Gerede)
>
> 4. support cursors in a result set.
> (contributed by Randy Gordon)
>
> For example:
> conn = OCI8.new('ruby/oci8')
> sql = 'SELECT CURSOR(SELECT * FROM foo where foo.c1 = bar.c1 ) FROM
> bar'
> conn.exec(sql) do |row|
> cursor_in_result_set = row[0]
> cursor_in_result_set.fetch do |row|
> puts row.join(',')
> end
> end
>
> 5. fix oraconf.rb for official x86_64 linux rpms.
> (contributed by Pat)
>
>
--
Cheers,
Jesse

KUBO Takehiro

4/28/2008 4:51:00 AM

0

Hi Jesse,

On Mon, Apr 28, 2008 at 12:18 PM, Jesse Hu <yizhih@gmail.com> wrote:
> And is the official i386/x86_64 linux Ruby-OCI8 rpms available?

No. I don't know how to make binary gems for mswin32.
Is there any article which explains the way?

KUBO Takehiro

4/28/2008 10:53:00 AM

0

Hi,

On Mon, Apr 28, 2008 at 1:51 PM, KUBO Takehiro <kubo@jiubao.org> wrote:
> Hi Jesse,
>
> On Mon, Apr 28, 2008 at 12:18 PM, Jesse Hu <yizhih@gmail.com> wrote:
>
> > And is the official i386/x86_64 linux Ruby-OCI8 rpms available?
>
> No. I don't know how to make binary gems for mswin32.

I misread 'rpms' as 'gems'. But same answer.
No official ruby-oci8 rpms will be made because the compiled binary
may not work on other distributions and with different oracle versions.
It is a task of distributor's package managers.

> > 5. fix oraconf.rb for official x86_64 linux rpms.
> > (contributed by Pat)

This means "official x86_64 linux instant client rpms."

Gerardo Santana Gómez Garrido

4/29/2008 3:15:00 PM

0

On 4/27/08, KUBO Takehiro <kubo@jiubao.org> wrote:
> Hi Jesse,
>
> On Mon, Apr 28, 2008 at 12:18 PM, Jesse Hu <yizhih@gmail.com> wrote:
> > And is the official i386/x86_64 linux Ruby-OCI8 rpms available?
>
> No. I don't know how to make binary gems for mswin32.
> Is there any article which explains the way?
>
>

Here it is what I do. If anyone have a better procedure, I'd like to know.

I use a Rakefile for building gems:
http://github.com/santana/ruby-informix/tree/maste...

But when building a binary gem, I need to add

s.platform = Gem::Platform::CURRENT

to the gemspec, which adds the platform name to the name of the gem. I
also add the shared object to the list of files.

Finally I build the extension and run rake package to create the
distribution files.
--
Gerardo Santana