MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / scalar_strings

Method scalar_strings

test/dialect/oracle/test_dialect.py:1105–1129  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

1103
1104 @testing.fixture
1105 def scalar_strings(self, connection):
1106 connection.exec_driver_sql(
1107 "CREATE OR REPLACE TYPE strings_t IS TABLE OF VARCHAR2 (100)"
1108 )
1109 connection.exec_driver_sql(r"""
1110CREATE OR REPLACE FUNCTION scalar_strings (
1111 count_in IN INTEGER, string_in IN VARCHAR2)
1112 RETURN strings_t
1113 AUTHID DEFINER
1114IS
1115 l_strings strings_t := strings_t ();
1116BEGIN
1117 l_strings.EXTEND (count_in);
1118
1119 FOR indx IN 1 .. count_in
1120 LOOP
1121 l_strings (indx) := string_in;
1122 END LOOP;
1123
1124 RETURN l_strings;
1125END;
1126 """)
1127 yield
1128 connection.exec_driver_sql("DROP FUNCTION scalar_strings")
1129 connection.exec_driver_sql("DROP TYPE strings_t")
1130
1131 @testing.fixture
1132 def two_strings(self, connection):

Calls 1

exec_driver_sqlMethod · 0.45

Tested by

no test coverage detected