[ruby-oci8-commit] [557] trunk/ruby-oci8: update comments for rdoc/yard.

nobody at rubyforge.org nobody at rubyforge.org
Sat Mar 2 12:02:11 UTC 2013


Revision: 557
Author:   kubo
Date:     2013-03-02 12:02:11 +0000 (Sat, 02 Mar 2013)
Log Message:
-----------
update comments for rdoc/yard.

Modified Paths:
--------------
    trunk/ruby-oci8/.yardopts
    trunk/ruby-oci8/ChangeLog
    trunk/ruby-oci8/ext/oci8/object.c
    trunk/ruby-oci8/lib/oci8/metadata.rb
    trunk/ruby-oci8/lib/oci8/oracle_version.rb

Modified: trunk/ruby-oci8/.yardopts
===================================================================
--- trunk/ruby-oci8/.yardopts	2013-03-02 06:51:01 UTC (rev 556)
+++ trunk/ruby-oci8/.yardopts	2013-03-02 12:02:11 UTC (rev 557)
@@ -5,6 +5,7 @@
 --exclude lib/oci8/compat.rb
 --exclude lib/dbd
 --hide-void-return
+--charset UTF-8
 -
 NEWS
 COPYING

Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog	2013-03-02 06:51:01 UTC (rev 556)
+++ trunk/ruby-oci8/ChangeLog	2013-03-02 12:02:11 UTC (rev 557)
@@ -1,4 +1,8 @@
 2013-03-02  KUBO Takehiro  <kubo at jiubao.org>
+	* .yardopts, ext/oci8/object.c, lib/oci8/metadata.rb,
+	  lib/oci8/oracle_version.rb: update comments for rdoc/yard.
+
+2013-03-02  KUBO Takehiro  <kubo at jiubao.org>
 	* ext/oci8/ocihandle.c: change arguments of internal methods
 	    OCIHandle#attr_get_*() to ignore "ORA-24328: illegal
 	    attribute value".

Modified: trunk/ruby-oci8/ext/oci8/object.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/object.c	2013-03-02 06:51:01 UTC (rev 556)
+++ trunk/ruby-oci8/ext/oci8/object.c	2013-03-02 12:02:11 UTC (rev 557)
@@ -1,6 +1,6 @@
 /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
 /*
- * Copyright (C) 2002-2009 KUBO Takehiro <kubo at jiubao.org>
+ * Copyright (C) 2002-2013 Kubo Takehiro <kubo at jiubao.org>
  */
 
 /*
@@ -681,30 +681,54 @@
     /* OCI8::TDO */
     cOCI8TDO = oci8_define_class_under(cOCI8, "TDO", &oci8_tdo_vtable);
     rb_define_private_method(cOCI8TDO, "setup", oci8_tdo_setup, 2);
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_STRING", INT2FIX(ATTR_STRING));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_RAW", INT2FIX(ATTR_RAW));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_OCINUMBER", INT2FIX(ATTR_OCINUMBER));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_FLOAT", INT2FIX(ATTR_FLOAT));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_INTEGER", INT2FIX(ATTR_INTEGER));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_OCIDATE", INT2FIX(ATTR_OCIDATE));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_BINARY_DOUBLE", INT2FIX(ATTR_BINARY_DOUBLE));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_BINARY_FLOAT", INT2FIX(ATTR_BINARY_FLOAT));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_NAMED_TYPE", INT2FIX(ATTR_NAMED_TYPE));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_NAMED_COLLECTION", INT2FIX(ATTR_NAMED_COLLECTION));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_CLOB", INT2FIX(ATTR_CLOB));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_NCLOB", INT2FIX(ATTR_NCLOB));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_BLOB", INT2FIX(ATTR_BLOB));
+    /* @private */
     rb_define_const(cOCI8TDO, "ATTR_BFILE", INT2FIX(ATTR_BFILE));
 #define ALIGNMENT_OF(type) (size_t)&(((struct {char c; type t;}*)0)->t)
+    /* @private */
     rb_define_const(cOCI8TDO, "SIZE_OF_POINTER", INT2FIX(sizeof(void *)));
+    /* @private */
     rb_define_const(cOCI8TDO, "ALIGNMENT_OF_POINTER", INT2FIX(ALIGNMENT_OF(void *)));
+    /* @private */
     rb_define_const(cOCI8TDO, "SIZE_OF_OCINUMBER", INT2FIX(sizeof(OCINumber)));
+    /* @private */
     rb_define_const(cOCI8TDO, "ALIGNMENT_OF_OCINUMBER", INT2FIX(ALIGNMENT_OF(OCINumber)));
+    /* @private */
     rb_define_const(cOCI8TDO, "SIZE_OF_OCIDATE", INT2FIX(sizeof(OCIDate)));
+    /* @private */
     rb_define_const(cOCI8TDO, "ALIGNMENT_OF_OCIDATE", INT2FIX(ALIGNMENT_OF(OCIDate)));
+    /* @private */
     rb_define_const(cOCI8TDO, "SIZE_OF_FLOAT", INT2FIX(sizeof(float)));
+    /* @private */
     rb_define_const(cOCI8TDO, "ALIGNMENT_OF_FLOAT", INT2FIX(ALIGNMENT_OF(float)));
+    /* @private */
     rb_define_const(cOCI8TDO, "SIZE_OF_DOUBLE", INT2FIX(sizeof(double)));
+    /* @private */
     rb_define_const(cOCI8TDO, "ALIGNMENT_OF_DOUBLE", INT2FIX(ALIGNMENT_OF(double)));
 
     /* OCI8::NamedType */

Modified: trunk/ruby-oci8/lib/oci8/metadata.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/metadata.rb	2013-03-02 06:51:01 UTC (rev 556)
+++ trunk/ruby-oci8/lib/oci8/metadata.rb	2013-03-02 12:02:11 UTC (rev 557)
@@ -14,33 +14,33 @@
   # OCI8::Metadata::Base's subclass.
   #
   # List of methods which return OCI8::Metadata::Base.
-  # * OCI8#describe_any(object_name)
-  # * OCI8#describe_table(table_name, table_only = false)
-  # * OCI8#describe_view(view_name)
-  # * OCI8#describe_procedure(procedure_name)
-  # * OCI8#describe_function(function_name)
-  # * OCI8#describe_package(package_name)
-  # * OCI8#describe_type(type_name)
-  # * OCI8#describe_synonym(synonym_name, check_public_also = true)
-  # * OCI8#describe_sequence(sequence_name)
-  # * OCI8#describe_schema(schema_name)
-  # * OCI8#describe_database(database_name)
-  # * OCI8::Metadata::Type#map_method
-  # * OCI8::Metadata::Type#order_method
-  # * OCI8::Metadata::Type#collection_element
+  # * {OCI8#describe_any OCI8#describe_any(object_name)}
+  # * {OCI8#describe_table OCI8#describe_table(table_name, table_only = false)}
+  # * {OCI8#describe_view OCI8#describe_view(view_name)}
+  # * {OCI8#describe_procedure OCI8#describe_procedure(procedure_name)}
+  # * {OCI8#describe_function OCI8#describe_function(function_name)}
+  # * {OCI8#describe_package OCI8#describe_package(package_name)}
+  # * {OCI8#describe_type OCI8#describe_type(type_name)}
+  # * {OCI8#describe_synonym OCI8#describe_synonym(synonym_name, check_public_also = true)}
+  # * {OCI8#describe_sequence OCI8#describe_sequence(sequence_name)}
+  # * {OCI8#describe_schema OCI8#describe_schema(schema_name)}
+  # * {OCI8#describe_database OCI8#describe_database(database_name)}
+  # * {OCI8::Metadata::Type#map_method OCI8::Metadata::Type#map_method}
+  # * {OCI8::Metadata::Type#order_method OCI8::Metadata::Type#order_method}
+  # * {OCI8::Metadata::Type#collection_element OCI8::Metadata::Type#collection_element}
   #
   # List of methods which return an array of OCI8::Metadata::Base.
-  # * OCI8::Cursor#column_metadata
-  # * OCI8::Metadata::Database#schemas
-  # * OCI8::Metadata::Schema#all_objects
-  # * OCI8::Metadata::Schema#objects
-  # * OCI8::Metadata::Table#columns
-  # * OCI8::Metadata::Package#subprograms
-  # * OCI8::Metadata::Procedure#arguments
-  # * OCI8::Metadata::Function#arguments
-  # * OCI8::Metadata::Type#type_attrs
-  # * OCI8::Metadata::Type#type_methods
-  # * OCI8::Metadata::TypeMethod#arguments
+  # * {OCI8::Cursor#column_metadata OCI8::Cursor#column_metadata}
+  # * {OCI8::Metadata::Database#schemas OCI8::Metadata::Database#schemas}
+  # * {OCI8::Metadata::Schema#all_objects OCI8::Metadata::Schema#all_objects}
+  # * {OCI8::Metadata::Schema#objects OCI8::Metadata::Schema#objects}
+  # * {OCI8::Metadata::Table#columns OCI8::Metadata::Table#columns}
+  # * {OCI8::Metadata::Package#subprograms OCI8::Metadata::Package#subprograms}
+  # * {OCI8::Metadata::Subprogram#arguments OCI8::Metadata::Procedure#arguments}
+  # * {OCI8::Metadata::Subprogram#arguments OCI8::Metadata::Function#arguments}
+  # * {OCI8::Metadata::Type#type_attrs OCI8::Metadata::Type#type_attrs}
+  # * {OCI8::Metadata::Type#type_methods OCI8::Metadata::Type#type_methods}
+  # * {OCI8::Metadata::TypeMethod#arguments OCI8::Metadata::TypeMethod#arguments}
   #
   # Example:
   #   conn = OCI8.new('username/passord')
@@ -54,32 +54,29 @@
       # Table 6-1 Attributes Belonging to All Parameters
 
       # Returns the number of parameters.
-      def num_params # :nodoc:
+      def num_params
         attr_get_ub2(OCI_ATTR_NUM_PARAMS)
       end
       private :num_params
 
-      # Returns the object ID, which is the same as the value of the
-      # OBJECT_ID column from ALL_OBJECTS. It returns +nil+
-      # if the database object doesn't have ID.
+      # Returns the object ID which corresponds to the data dictionary
+      # view column ALL_OBJECTS.OBJECT_ID.
       #
       # @return [Integer or nil]
       def obj_id
         attr_get_ub4(OCI_ATTR_OBJ_ID, false)
       end
 
-      # Retruns the object name such as table name, view name,
-      # procedure name, and so on.
+      # Returns the object name which corresponds to the data dictionary view column ALL_OBJECTS.OBJECT_NAME.
       #
-      # @return [String]
+      # @return [String or nil] object name
       def obj_name
         attr_get_string(OCI_ATTR_OBJ_NAME, false)
       end
 
-      # Retruns the schema name. It returns +nil+
-      # if the database object is not defined just under a schema.
+      # Returns the schema name which corresponds to the data dictionary view column ALL_OBJECTS.OWNER.
       #
-      # @return [String]
+      # @return [String or nil] schema name
       def obj_schema
         attr_get_string(OCI_ATTR_OBJ_SCHEMA, false)
       end
@@ -92,7 +89,8 @@
       #  attr_get_oradate(OCI_ATTR_TIMESTAMP)
       #end
 
-      def inspect # :nodoc:
+      # @private
+      def inspect
         "#<#{self.class.name}:(#{obj_id}) #{obj_schema}.#{obj_name}>"
       end
       private
@@ -103,8 +101,9 @@
       alias __word attr_get_sb4
       def __anydata(idx); raise NotImplementedError; end
 
-      # SQLT values to name
-      DATA_TYPE_MAP = {} # :nodoc:
+      # Mapping from SQLT values to names
+      # @private
+      DATA_TYPE_MAP = {}
 
       # SQLT_CHR
       DATA_TYPE_MAP[1] = [:varchar2,
@@ -346,7 +345,7 @@
     # into other metadata classes.
     #
     # An instance of this class is returned by:
-    # * OCI8::Metadata::Schema#all_objects
+    # * {OCI8::Metadata::Schema#all_objects OCI8::Metadata::Schema#all_objects}
     class Unknown < Base
       register_ptype OCI_PTYPE_UNK
     end
@@ -354,14 +353,10 @@
     # Information about tables
     #
     # An instance of this class is returned by:
-    # * OCI8#describe_any(name)
-    # * OCI8#describe_table(name)
-    # * OCI8::Metadata::Schema#all_objects
-    # * OCI8::Metadata::Schema#objects
-    #
-    # See also:
-    # * OCI8::Metadata::Base#obj_name
-    # * OCI8::Metadata::Base#obj_schema
+    # * {OCI8#describe_any OCI8#describe_any(name)}
+    # * {OCI8#describe_table OCI8#describe_table(name)}
+    # * {OCI8::Metadata::Schema#all_objects OCI8::Metadata::Schema#all_objects}
+    # * {OCI8::Metadata::Schema#objects OCI8::Metadata::Schema#objects}
     class Table < Base
       register_ptype OCI_PTYPE_TABLE
 
@@ -464,15 +459,11 @@
     # Information about views
     #
     # An instance of this class is returned by:
-    # * OCI8#describe_any(name)
-    # * OCI8#describe_table(name, false)
-    # * OCI8#describe_view(name)
-    # * OCI8::Metadata::Schema#all_objects
-    # * OCI8::Metadata::Schema#objects
-    #
-    # See also:
-    # * OCI8::Metadata::Base#obj_name
-    # * OCI8::Metadata::Base#obj_schema
+    # * {OCI8#describe_any OCI8#describe_any(name)}
+    # * {OCI8#describe_table OCI8#describe_table(name, false)}
+    # * {OCI8#describe_view OCI8#describe_view(name)}
+    # * {OCI8::Metadata::Schema#all_objects OCI8::Metadata::Schema#all_objects}
+    # * {OCI8::Metadata::Schema#objects OCI8::Metadata::Schema#objects}
     class View < Base
       register_ptype OCI_PTYPE_VIEW
 
@@ -525,8 +516,8 @@
     # with a set of parameters. A subprogram can be either a procedure
     # or a function.
     #
-    # This is the abstract base class of OCI8::Metadata::Procedure and
-    # OCI8::Metadata::Function.
+    # This is the abstract base class of {OCI8::Metadata::Procedure OCI8::Metadata::Procedure} and
+    # {OCI8::Metadata::Function OCI8::Metadata::Function}.
     class Subprogram < Base
       ## Table 6-4 Attribute Belonging to Procedures or Functions
 
@@ -565,9 +556,9 @@
       alias name obj_name # :nodoc: for backward compatibility
 
       # Returns +nil+ for a standalone stored subprogram,
-      # positive integer for a
-      # {overloaded packaged subprogram}[http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/subprograms.htm#i12352].
-      # , otherwise zero.
+      # positive integer for an
+      # {overloaded packaged subprogram}[http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/subprograms.htm#i12352],
+      # otherwise zero.
       #
       # @return [Integer or nil]
       def overload_id
@@ -589,7 +580,8 @@
         @is_standalone
       end
 
-      def inspect # :nodoc:
+      # @private
+      def inspect
         "#<#{self.class.name}: #{name}>"
       end
     end
@@ -1230,7 +1222,7 @@
       end
 
       def inspect # :nodoc:
-        "#<#{self.class.name}:(#{obj_id}) #{obj_schema}.#{obj_name}>"
+        "#<#{self.class.name}:(#{obj_id}) #{obj_schema}.#{obj_name} FOR #{translated_name}>"
       end
     end
 

Modified: trunk/ruby-oci8/lib/oci8/oracle_version.rb
===================================================================
--- trunk/ruby-oci8/lib/oci8/oracle_version.rb	2013-03-02 06:51:01 UTC (rev 556)
+++ trunk/ruby-oci8/lib/oci8/oracle_version.rb	2013-03-02 12:02:11 UTC (rev 557)
@@ -1,6 +1,6 @@
 # oracle_version.rb implements OCI8::OracleVersion.
 #
-# Copyright (C) 2009 KUBO Takehiro <kubo at jiubao.org>
+# Copyright (C) 2009-2013 Kubo Takehiro <kubo at jiubao.org>
 
 #
 class OCI8
@@ -21,9 +21,9 @@
     attr_reader :minor
     # The third part of the Oracle version.
     attr_reader :update
+    # The fourth part of the Oracle version.
+    attr_reader :patch
     # The fifth part of the Oracle version.
-    attr_reader :patch
-    # The fourth part of the Oracle version.
     attr_reader :port_update
 
     # Creates an OCI8::OracleVersion object.



More information about the ruby-oci8-commit mailing list