Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Scripting language with a support for array interface
> Is there any scripting language with the support for array
> interface? Perl doesn't have it nor does PHP. What about Python?
> Does it support array bind and, if it does, does it cheat like DBI
> which breaks the array under the hood and internally performs a
> loop, or does it do it for real?
I think, python doesn't cheat here.
Here's the code sample:
***
import cx_Oracle
c = cx_Oracle.connect('scott/tiger')
crs = c.cursor()
rows = [ { "intval":n , "charval":'text '+str(n) } for n in range(200)
]
stmt = "insert into test_table values (:intval,:charval)"
crs.executemany(stmt, rows)
c.commit()
***
And here's part of tkprof output:
***
insert into test_table
values
(:intval,:charval)
call count cpu elapsed disk query current
rows
------- ------ -------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0 Execute 1 0.00 0.00 0 1 5 200 Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 1 5 200 Elapsed times include waiting on following events: Event waited on Times Max. Wait TotalWaited
-- Egor http://www.oracledba.ruReceived on Mon Nov 28 2005 - 13:03:26 CST
![]() |
![]() |