Class: OCI8::Metadata::Database
Overview
Metadata for a database.
This is returned by:
-
OCI8#describe_database(database_name)
Instance Method Summary collapse
-
#autocommit_ddl ⇒ Object
Is autocommit mode required for DDL statements? Values are
:ac_ddl
and:no_ac_ddl
. -
#catalog_location ⇒ Object
Position of the catalog in a qualified table.
-
#charset_id ⇒ Object
database character set Id.
-
#charset_name ⇒ Object
database character set name.
-
#cursor_commit_behavior ⇒ Object
How a COMMIT operation affects cursors and prepared statements in the database.
-
#inspect ⇒ Object
:nodoc:.
-
#locking_mode ⇒ Object
Locking mode for the database.
-
#max_catalog_namelen ⇒ Object
Maximum length of a catalog (database) name.
-
#max_column_len ⇒ Object
Maximum length of a column name.
-
#max_proc_len ⇒ Object
Maximum length of a procedure name.
-
#ncharset_id ⇒ Object
database national language support character set Id.
-
#ncharset_name ⇒ Object
database national language support character set name.
-
#nowait_support ⇒ Object
Does database support the nowait clause? Values are
:nw_supported
and:nw_unsupported
. -
#savepoint_support ⇒ Object
Does database support savepoints? Values are
:sp_supported
and:sp_unsupported
. -
#schemas ⇒ Object
array of Schema objects in the database.
-
#version ⇒ Object
database version.
Methods inherited from Base
#obj_id, #obj_name, #obj_schema
Instance Method Details
#autocommit_ddl ⇒ Object
Is autocommit mode required for DDL statements? Values are :ac_ddl
and :no_ac_ddl
1903 1904 1905 1906 1907 1908 |
# File 'lib/oci8/metadata.rb', line 1903 def autocommit_ddl case attr_get_ub1(OCI_ATTR_AUTOCOMMIT_DDL) when 0; :ac_ddl when 1; :no_ac_ddl end end |
#catalog_location ⇒ Object
Position of the catalog in a qualified table. Values are :cl_start
and :cl_end
1876 1877 1878 1879 1880 1881 |
# File 'lib/oci8/metadata.rb', line 1876 def catalog_location case attr_get_ub1(OCI_ATTR_CATALOG_LOCATION) when 0; :cl_start when 1; :cl_end end end |
#charset_id ⇒ Object
database character set Id
1830 1831 1832 |
# File 'lib/oci8/metadata.rb', line 1830 def charset_id attr_get_ub2(OCI_ATTR_CHARSET_ID) end |
#charset_name ⇒ Object
database character set name
1920 1921 1922 |
# File 'lib/oci8/metadata.rb', line 1920 def charset_name __charset_name(charset_id) end |
#cursor_commit_behavior ⇒ Object
How a COMMIT operation affects cursors and prepared statements in the database. Values are:
:cusror_open
-
preserve cursor state as before the commit operation
:cursor_closed
-
cursors are closed on COMMIT, but the application can still re-execute the statement without re-preparing it
1862 1863 1864 1865 1866 1867 |
# File 'lib/oci8/metadata.rb', line 1862 def cursor_commit_behavior case attr_get_ub1(OCI_ATTR_CURSOR_COMMIT_BEHAVIOR) when 0; :cusror_open when 1; :cursor_closed end end |
#inspect ⇒ Object
:nodoc:
1934 1935 1936 |
# File 'lib/oci8/metadata.rb', line 1934 def inspect # :nodoc: "#<#{self.class.name}:(#{obj_id}) #{obj_name} #{version}>" end |
#locking_mode ⇒ Object
Locking mode for the database. Values are :lock_immediate
and :lock_delayed
1912 1913 1914 1915 1916 1917 |
# File 'lib/oci8/metadata.rb', line 1912 def locking_mode case attr_get_ub1(OCI_ATTR_LOCKING_MODE) when 0; :lock_immediate when 1; :lock_delayed end end |
#max_catalog_namelen ⇒ Object
Maximum length of a catalog (database) name
1870 1871 1872 |
# File 'lib/oci8/metadata.rb', line 1870 def max_catalog_namelen attr_get_ub1(OCI_ATTR_MAX_CATALOG_NAMELEN) end |
#max_column_len ⇒ Object
Maximum length of a column name
1851 1852 1853 |
# File 'lib/oci8/metadata.rb', line 1851 def max_column_len attr_get_ub4(OCI_ATTR_MAX_COLUMN_LEN) end |
#max_proc_len ⇒ Object
Maximum length of a procedure name
1846 1847 1848 |
# File 'lib/oci8/metadata.rb', line 1846 def max_proc_len attr_get_ub4(OCI_ATTR_MAX_PROC_LEN) end |
#ncharset_id ⇒ Object
database national language support character set Id
1835 1836 1837 |
# File 'lib/oci8/metadata.rb', line 1835 def ncharset_id attr_get_ub2(OCI_ATTR_NCHARSET_ID) end |
#ncharset_name ⇒ Object
database national language support character set name
1925 1926 1927 |
# File 'lib/oci8/metadata.rb', line 1925 def ncharset_name __charset_name(ncharset_id) end |
#nowait_support ⇒ Object
Does database support the nowait clause? Values are :nw_supported
and :nw_unsupported
1894 1895 1896 1897 1898 1899 |
# File 'lib/oci8/metadata.rb', line 1894 def nowait_support case attr_get_ub1(OCI_ATTR_NOWAIT_SUPPORT) when 0; :nw_supported when 1; :nw_unsupported end end |
#savepoint_support ⇒ Object
Does database support savepoints? Values are :sp_supported
and :sp_unsupported
1885 1886 1887 1888 1889 1890 |
# File 'lib/oci8/metadata.rb', line 1885 def savepoint_support case attr_get_ub1(OCI_ATTR_SAVEPOINT_SUPPORT) when 0; :sp_supported when 1; :sp_unsupported end end |
#schemas ⇒ Object
array of Schema objects in the database
1930 1931 1932 |
# File 'lib/oci8/metadata.rb', line 1930 def schemas @schemas ||= list_schemas.to_a end |
#version ⇒ Object
database version
1825 1826 1827 |
# File 'lib/oci8/metadata.rb', line 1825 def version attr_get_string(OCI_ATTR_VERSION) end |