Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ check-diff:
echo "--- Actual Files ---" ; \
echo "$$ACTUAL_FILES" ; \
exit 1 ; \
fi
fi
6 changes: 5 additions & 1 deletion v2/loader/information_schema_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ func (s *informationSchemaSource) ColumnList(table string) ([]*SpannerColumn, er
` AND ic.COLUMN_NAME = c.COLUMN_NAME` +
` AND ic.INDEX_NAME = "PRIMARY_KEY" ` +
`) IS_PRIMARY_KEY, ` +
`IS_GENERATED = "ALWAYS" AS IS_GENERATED ` +
`IS_GENERATED = "ALWAYS" AS IS_GENERATED, ` +
`c.IS_HIDDEN ` +
`FROM INFORMATION_SCHEMA.COLUMNS c ` +
`WHERE c.TABLE_SCHEMA = "" AND c.TABLE_NAME = @table ` +
`ORDER BY c.ORDINAL_POSITION`
Expand Down Expand Up @@ -136,6 +137,9 @@ func (s *informationSchemaSource) ColumnList(table string) ([]*SpannerColumn, er
if err := row.ColumnByName("IS_GENERATED", &c.IsGenerated); err != nil {
return nil, err
}
if err := row.ColumnByName("IS_HIDDEN", &c.IsHidden); err != nil {
return nil, err
}

res = append(res, &c)
}
Expand Down
6 changes: 6 additions & 0 deletions v2/test/testdata/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,9 @@ CREATE TABLE Inflectionzz (
X STRING(32) NOT NULL,
Y STRING(32) NOT NULL,
) PRIMARY KEY(X);

CREATE TABLE FullTextSearch (
ID INT64 NOT NULL,
Content STRING(2048) NOT NULL,
Content_Tokens TOKENLIST AS (TOKENIZE_FULLTEXT(Content)) HIDDEN,
) PRIMARY KEY(ID);
2 changes: 1 addition & 1 deletion v2/test/testmodels/default/composite_primary_key.yo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

176 changes: 176 additions & 0 deletions v2/test/testmodels/default/full_text_search.yo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions v2/test/testmodels/dump_types/full_text_search.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Field list of FullTextSearch

* ID INT64 int64
* Content STRING(2048) string
* ContentTokens TOKENLIST TOKENLIST

# Primary Key

* ID INT64 int64

# Index list of FullTextSearch

16 changes: 8 additions & 8 deletions v2/test/testmodels/legacy_default/composite_primary_key.yo.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading