core/query: consistently handle absent aliases #491

Merged
merged 1 commit into from Feb 8, 2017

Projects

None yet

3 participants

@jbowens
Member
jbowens commented Feb 8, 2017 edited

In most places throughout core/query we expect alias columns to
be non-null and the empty string if not provided. The only exception is
when the entity being aliased might not even exist (for ex,
account_alias on an output which might not even have an associated
account_id).

The code for querying accounts and aliases expected absent aliases to
be stored in the database as the empty string. The indexing code stored
them as NULLs. This commit fixes the indexing code and makes the alias
columns on the annotated_accounts and annotated_assets tables
non-nullable.

@jbowens jbowens core/query: consistently handle absent aliases
In most places throughout core/query we expect alias columns to
be non-null and the empty string if not provided. The only exception is
when the entity being aliases might not even exist (for ex,
`account_alias` on an output which might not even have an associated
account_id).

The code for querying accounts and aliases expected absent aliases to
be stored in the database as the empty string. The indexing code stored
them as NULLs. This commit fixes the indexing code and makes the alias
columns on the annotated_accounts and annotated_assets tables
non-nullable.
40c31a6
@jbowens jbowens added the PTAL label Feb 8, 2017
@jbowens
Member
jbowens commented Feb 8, 2017

PTAL

@kr
kr approved these changes Feb 8, 2017 View changes
@kr
Member
kr commented Feb 8, 2017

LGTM

@chainbot chainbot merged commit 12fa6b0 into main Feb 8, 2017

3 checks passed

licence/cla Contributor License Agreement is signed.
Details
wercker/cored Wercker pipeline passed
Details
wercker/java Wercker pipeline passed
Details
@chainbot chainbot deleted the nonnull-alias branch Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment