# activerecord-spanner-adapter - Class ActiveRecordSpannerAdapter::InformationSchema (v2.2.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.2.0 (latest)](https://docs.cloud.google.com/ruby/docs/reference/activerecord-spanner-adapter/latest/ActiveRecordSpannerAdapter-InformationSchema)
- [2.1.0](https://docs.cloud.google.com/ruby/docs/reference/activerecord-spanner-adapter/2.1.0/ActiveRecordSpannerAdapter-InformationSchema)
- [2.0.0](https://docs.cloud.google.com/ruby/docs/reference/activerecord-spanner-adapter/2.0.0/ActiveRecordSpannerAdapter-InformationSchema)
Reference documentation and code samples for the activerecord-spanner-adapter class ActiveRecordSpannerAdapter::InformationSchema.

## Inherits

- Object

## Includes

- [ActiveRecord::ConnectionAdapters::Quoting](https://docs.cloud.google.com/ruby/docs/reference/activerecord-spanner-adapter/latest/ActiveRecord-ConnectionAdapters-Quoting)

## Methods

### #_create_column

    def _create_column(table_name, row, primary_keys, column_options, schema_name: "")

### #check_constraints

    def check_constraints(table_name, schema_name: "")

### #connection

    def connection()

Returns the value of attribute connection.

### #foreign_keys

    def foreign_keys(from_table_name, from_schema_name: "")

### #index

    def index(table_name, index_name, schema_name: "")

### #index_columns

    def index_columns(table_name, schema_name: "", index_name: nil)

### #indexes

    def indexes(table_name, schema_name: "", index_name: nil, index_type: nil)

### #indexes_by_columns

    def indexes_by_columns(table_name, column_names, schema_name: "")

### #initialize

    def initialize(connection) -> InformationSchema

**Returns**

- ([InformationSchema](https://docs.cloud.google.com/ruby/docs/reference/activerecord-spanner-adapter/latest/ActiveRecordSpannerAdapter-InformationSchema)) --- a new instance of InformationSchema

### #parse_type_and_limit

    def parse_type_and_limit(value)

### #table

    def table(table_name, schema_name: "", view: nil)

### #table_column

    def table_column(table_name, column_name, schema_name: "")

### #table_columns

    def table_columns(table_name, column_name: nil, schema_name: "")

### #table_primary_keys

    def table_primary_keys(table_name, include_parent_keys = IsRails71OrLater, schema_name: "")

Returns the primary key columns of the given table. By default it will only return the columns that are not part
of the primary key of the parent table (if any). These are the columns that are considered the primary key by
ActiveRecord. The parent primary key columns are filtered out by default to allow interleaved tables to be
considered as tables with a single-column primary key by ActiveRecord. The actual primary key of the table will
include both the parent primary key columns and the 'own' primary key columns of a table.

### #tables

    def tables(table_name: nil, schema_name: "", view: nil)

### #unquote_string

    def unquote_string(value)

## Constants

### IsRails71OrLater

**value:**ActiveRecord.gem_version \>= Gem::Version.create("7.1.0")