Skip to content

Mysql - get length from array#36

Merged
ondrajodas merged 3 commits intomasterfrom
ondra-mysql-array-length
Nov 11, 2020
Merged

Mysql - get length from array#36
ondrajodas merged 3 commits intomasterfrom
ondra-mysql-array-length

Conversation

@ondrajodas
Copy link
Copy Markdown
Contributor

Zkopírované ze snflk datatypes

@ondrajodas ondrajodas force-pushed the ondra-mysql-array-length branch from f978a12 to 3a20a70 Compare November 6, 2020 13:59
@ondrajodas ondrajodas marked this pull request as ready for review November 6, 2020 14:12
Comment thread src/Definition/MySQL.php Outdated
}
break;

case "TEXT":
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

našel jsem u typu text vyplněnou délku
image

@michaljurecko
Copy link
Copy Markdown

ahoj. nechapem presne preco to je potrebne upravit, a chyba aj referencia na Jiru ... mozes mi to prosim lepsie vysvetlit (napr. kde si to nasiel ... atd)

@ondrajodas
Copy link
Copy Markdown
Contributor Author

dělám to pro telemetry extractor kde si vvytahuju metadata z tabulky a než abych to skládal v extractoru tak si jednotlivý údaje vytáhnu do pole a tady potom skládám length

je to pro pole:
https://github.com/keboola/ex-telemetry-data/blob/COM-473-ondra-init-extractor/src/ValueObject/Column.php#L102L106

@michaljurecko michaljurecko removed their request for review November 11, 2020 08:39
Comment thread src/Definition/MySQL.php
throw new InvalidOptionException(sprintf('Length option "%s" not supported', $diff[0]));
}

$characterMaximum = isset($lengthOptions['character_maximum']) ? $lengthOptions['character_maximum'] : null;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

MySQL vracia stlpec s nazvom character_maximum_length a nie character_maximum ... tak si to bude musel programator premapovat .... ale asi to teda chceme mat vsade rovnako, OK (pytam sa pre istotu).

https://dev.mysql.com/doc/refman/8.0/en/char.html#:~:text=The%20CHAR%20and%20VARCHAR%20types%20are%20declared%20with%20a%20length,value%20from%200%20to%20255.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

vím - dal jsem to ale všude stejný

Comment thread tests/MySQLDatatypeTest.php Outdated
'numeric_scale' => '38'
]
]);
new MySQL('NUMERIC', [
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tomuto neozumiem ... staci ze jedno z volani vyhodi exception a spadne to .... takze ostatne sa neotestuju .... napr, spadne volanie na riadku 60, vyhodi sa exception -> volanie na riadku 66 sa ani nespusti .... IMHO tam treba spravit nejaky data provider na to pole co je parameter, ... alebo aspon cyklus.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

nj, já jsem to dal do invalid testu....opravené díky :)

@ondrajodas ondrajodas merged commit c70b788 into master Nov 11, 2020
@ondrajodas ondrajodas deleted the ondra-mysql-array-length branch November 11, 2020 10:55
tomasfejfar pushed a commit that referenced this pull request Sep 14, 2022
tomasfejfar pushed a commit that referenced this pull request Mar 8, 2023
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