Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Value: Spanner Metadata Accessor #886

Open
wants to merge 6 commits into
base: feature/default-value
Choose a base branch
from

Conversation

NirnayaSindhuSuthari
Copy link
Contributor

@NirnayaSindhuSuthari NirnayaSindhuSuthari commented Jul 24, 2024

  • DefaultValue of type DefaultValue is added in the columnDef struct.
  • Validity of Default Value by spanner is checked by IsSpannerSupportedStatement .
  • isValidSpannerStatement fires query SELECT CAST( (statement) AS (column type) ) to spanner on metadata database.
  • Default clause is added in the SQL tab for spanner supported default values.
    image

@NirnayaSindhuSuthari NirnayaSindhuSuthari requested a review from a team as a code owner July 24, 2024 14:23
@NirnayaSindhuSuthari NirnayaSindhuSuthari requested review from manitgupta and aksharauke and removed request for a team July 24, 2024 14:23
@NirnayaSindhuSuthari NirnayaSindhuSuthari changed the base branch from master to feature/default-value July 24, 2024 15:07
Copy link
Collaborator

@darshan-sj darshan-sj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left few comments.

sources/common/toddl.go Outdated Show resolved Hide resolved
sources/common/toddl.go Show resolved Hide resolved
spanner/ddl/ast.go Outdated Show resolved Hide resolved
conversion/conversion.go Outdated Show resolved Hide resolved
cmd/data.go Show resolved Hide resolved
@@ -78,7 +78,7 @@ func (ci *ConvImpl) SchemaConv(migrationProjectId string, sourceProfile profiles
case constants.POSTGRES, constants.MYSQL, constants.DYNAMODB, constants.SQLSERVER, constants.ORACLE:
return schemaFromSource.schemaFromDatabase(migrationProjectId, sourceProfile, targetProfile, &GetInfoImpl{}, &common.ProcessSchemaImpl{})
case constants.PGDUMP, constants.MYSQLDUMP:
return schemaFromSource.SchemaFromDump(sourceProfile.Driver, targetProfile.Conn.Sp.Dialect, ioHelper, &ProcessDumpByDialectImpl{})
return schemaFromSource.SchemaFromDump(targetProfile.Conn.Sp.Project, targetProfile.Conn.Sp.Instance, sourceProfile.Driver, targetProfile.Conn.Sp.Dialect, ioHelper, &ProcessDumpByDialectImpl{})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had discussed that you will pass the whole targetProfile here right? Instead of 3 params

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants