Skip to content

Update error reporting for empty and null columns while initializing.#82

Merged
EvanHStanton merged 1 commit intomainfrom
TEM-3313
Mar 19, 2024
Merged

Update error reporting for empty and null columns while initializing.#82
EvanHStanton merged 1 commit intomainfrom
TEM-3313

Conversation

@EvanHStanton
Copy link
Copy Markdown
Contributor

Updated utils.rs error reporting for cases where columns are either non-existent or null.

        let job_id: i64 = result_row
            .get_by_name("job_id")
            .expect("job_id column does not exist.")
            .expect("job_id column was null.");
        let name: String = result_row
            .get_by_name("name")
            .expect("name column does not exist.")
            .expect("name column was null.");
        let job_type: String = result_row
            .get_by_name("job_type")
            .expect("job_type column does not exist.")
            .expect("job_type column was null.");
        let transformer: String = result_row
            .get_by_name("transformer")
            .expect("transformer column does not exist.")
            .expect("transformer column was null.");
        let search_alg: String = result_row
            .get_by_name("search_alg")
            .expect("search_alg column does not exist.")
            .expect("search_alg column was null.");
        let params: pgrx::JsonB = result_row
            .get_by_name("params")
            .expect("params column does not exist.")
            .expect("params column was null.");

Signed-off-by: Evan Stanton <evan.h.stanton@gmail.com>
@EvanHStanton EvanHStanton marked this pull request as ready for review March 19, 2024 13:00
@EvanHStanton EvanHStanton merged commit f51f87c into main Mar 19, 2024
@EvanHStanton EvanHStanton deleted the TEM-3313 branch March 19, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants