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

[output-mapping] Split TableStructureValidator #341

Merged
merged 6 commits into from
Jan 2, 2025
Merged

Conversation

ondrajodas
Copy link
Contributor

Comment on lines -33 to -38
if (!$this->hasNewNativeTypeFeature) {
return $tableChangesStore;
}
if (!$schemaColumns) {
return $tableChangesStore;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tyhle podmínky jsou tady zbytečně, tak jsem je do přepsanýho kódu vůbec nedával

ChangesStore totiž vstupuje jen do StoragePreparer a tam je podmínka stejná, takže tady to řešit nemusíme

https://github.com/keboola/platform-libraries/blob/main/libs/output-mapping/src/Storage/StoragePreparer.php#L40

Copy link
Contributor

@ErikZigo ErikZigo left a comment

Choose a reason for hiding this comment

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

Přijde mi to super. Jen uprav prosím ty dvě chybové hlášky.

}
throw new InvalidOutputException($e->getMessage(), $e->getCode(), $e);
if ($this->table['isTyped'] === true) {
throw new InvalidOutputException('Table is typed.');
Copy link
Contributor

Choose a reason for hiding this comment

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

V té chybové hlášce by mělo být jméno nebo ID té tabulky.

public function validate(?array $schemaColumns): TableChangesStore
{
if ($this->table['isTyped'] === false) {
throw new InvalidOutputException('Table is not typed.');
Copy link
Contributor

Choose a reason for hiding this comment

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

V té chybové hlášce by mělo být jméno nebo ID té tabulky.

@ondrajodas
Copy link
Contributor Author

upravil jsem ty error messages a vypnul jsem ještě Synapse testy

@ondrajodas ondrajodas merged commit 3e54325 into main Jan 2, 2025
15 checks passed
@ondrajodas ondrajodas deleted the PST-1775-ondra branch January 2, 2025 08:17
@ondrajodas ondrajodas changed the title Split TableStructureValidator [output-mapping] Split TableStructureValidator Jan 16, 2025
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