Skip to content

Commit

Permalink
chages
Browse files Browse the repository at this point in the history
  • Loading branch information
asthamohta committed Dec 26, 2024
1 parent 5eeb3b5 commit fed41c9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions expressions_api/expression_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ type ExpressionVerificationAccessorImpl struct {
func NewExpressionVerificationAccessorImpl(ctx context.Context, project string, instance string) (*ExpressionVerificationAccessorImpl, error) {
var spannerAccessor *spanneraccessor.SpannerAccessorImpl
var err error
if project != "" && instance != "" {
fmt.Println("###1")
spannerAccessor, err = spanneraccessor.NewSpannerAccessorClientImplWithSpannerClient(ctx, fmt.Sprintf("projects/%s/instances/%s/databases/%s", project, instance, constants.TEMP_DB))
if project == "" || instance == "" {
spannerAccessor, err = spanneraccessor.NewSpannerAccessorClientImpl(ctx)
if err != nil {
return nil, err
}
} else {
fmt.Println("###2")
spannerAccessor, err = spanneraccessor.NewSpannerAccessorClientImpl(ctx)
spannerAccessor, err = spanneraccessor.NewSpannerAccessorClientImplWithSpannerClient(ctx, fmt.Sprintf("projects/%s/instances/%s/databases/%s", project, instance, constants.TEMP_DB))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit fed41c9

Please sign in to comment.