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

code-gen: add field checks to partials when on staging #477

Merged
merged 1 commit into from
Nov 5, 2020

Conversation

dirkdev98
Copy link
Member

This works by dumping the possible keys, and looping over the input objects. It is guarded by an isStaging() check, so shouldn't be too much of a performance hit.

Closes #466

This works by dumping the possible keys, and looping over the input objects. It is guarded by an `isStaging()` check, so shouldn't be too much of a performance hit.

Closes #466
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2020

==== C8 test coverage ====
Statements: 70.15% ( 18291/26075 )
Branches : 71.9% ( 2165 /3011 )
Functions : 70.37% ( 677 /962 )
Lines : 70.15% ( 18291 /26075 )

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2020

==== Benchmark result ====

Node.js version: 15

Total benchmarks: 13
          Passed: 13
          Failed: 0
-----------
lbu validator simple                    2000000  iterations      506  ns/op
yup validator simple                      20000  iterations    60645  ns/op
fastest-validator validator simple     10000000  iterations      140  ns/op
lbu validator nested                      50000  iterations    48642  ns/op
yup validator nested                       5000  iterations   410922  ns/op
fastest-validator validator nested      2000000  iterations      800  ns/op
logger - strings                         500000  iterations     2122  ns/op
logger - objects                         500000  iterations     2674  ns/op
logger - deep objects                    500000  iterations     4154  ns/op
uuid                                    2000000  iterations      528  ns/op
uuid.isValid                           10000000  iterations      148  ns/op
isNil                                 500000000  iterations        0  ns/op
isPlainObject                         100000000  iterations       18  ns/op

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2020

==== Benchmark result ====

Node.js version: 14

Total benchmarks: 13
          Passed: 13
          Failed: 0
-----------
lbu validator simple                    5000000  iterations      454  ns/op
yup validator simple                      20000  iterations    69548  ns/op
fastest-validator validator simple     10000000  iterations      123  ns/op
lbu validator nested                      50000  iterations    46155  ns/op
yup validator nested                       2000  iterations   520699  ns/op
fastest-validator validator nested      2000000  iterations      772  ns/op
logger - strings                         500000  iterations     2262  ns/op
logger - objects                         500000  iterations     2791  ns/op
logger - deep objects                    500000  iterations     4933  ns/op
uuid                                    2000000  iterations      595  ns/op
uuid.isValid                           10000000  iterations      128  ns/op
isNil                                 500000000  iterations        0  ns/op
isPlainObject                         100000000  iterations       18  ns/op

@dirkdev98
Copy link
Member Author

Backends have expected failures.
Pretty cool feature tho, @tjonger !

@dirkdev98 dirkdev98 merged commit 13b1ae0 into main Nov 5, 2020
@dirkdev98 dirkdev98 deleted the feat/sql-key-check branch November 5, 2020 21:08
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.

code-gen: query where and update object key validation
1 participant