Open
Conversation
fcc4d5c to
d59e486
Compare
Owner
|
@javier-garcia-meteologica Thanks for the tickets and PRs you're submitting. I don't have time right away to look at these in detail they need, but I'll try to catch up with them in the week or two. |
d2c924c to
6bedee5
Compare
6bedee5 to
7233244
Compare
|
Can you grant maintainership to someone you trust, or has more time? The library is an oasis in the desert of janky ORMs in the JS/TS land. Would be good to keep on truckin'. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #49
StructureMapusing module augmentation instead of usingzapatos/schema. This approach is more modular, allows an arbitrary number of modules making extensions to Zapatos (as long as there are no name collisions). This is similar to howHTMLElementTagNameMapworks. If there are name collisions across modules (e.g. multiple databases), the optionglobalStructureNamecan be used to solve the conflict or to disable augmentation ofStructureMap.By default,
sqland shortcuts useSQLandSQLStructurefor inference which derive all of their information fromStructureMap.Adds support for inferring the schema name of the table from the database.
SQLStructureto use in a shortcut and also maintain type inference in the rest of type arguments. It's necessary to workaround microsoft/TypeScript#26242, so I created 2 shortcuts to make it possbile:tableandtables.In order to make zapatos compatible with multiple databases, I had to use a modular architecture to avoid conflicts. Now zapatos doesn't require centralized ambient modules or namespaces, it can work only by passing type arguments to functions. Optionally,
StructureMapcan be augmented to provide centralized typings, but the user can choose to disable it or can configure how to resolve name conflicts.There are a few tasks left, like changing howschema/customworks to be more modular. I don't know much about how those custom types are used and, if some maintainer can help me, I'm going to need some help withschema/customand polishing this PR.EDIT: Change
schema/customto modules