Comments (1)
A possible fix is as follows. Steps should be done in a different order than below so as to do in small incremental changes
- change method signature of
export function params<TRoot>(uriRoot: string, serviceConfig: ODataServiceConfig, schema: ODataSchema): [ParameterDefinition[], Params<TRoot>]
to returnParams<TRoot>
(no more mutable array) - change
Params<TRoot>
, make it contain aParameterDefinition
- change
QbEmit
. Give it a second parameter that maps @param names toÒDataTypeRef
- Rename
QbEmit
to something that represents the entire query. This class will be used a lot - Change EVERYTHING to return a
Writer<T, QbEmit>
- Start with
serialize
method. Serialize has both aT
(which might be aParams<Root>
) and anODataTypeRef
. It can emit (Writer
monad) aQbEmit
with a mapping from a param to it's type - From there it is a a cascade which will include changing EVERYTHING to a
Writer
(or maybeState
) monad
- Start with
Once all mutable state is gone, it will be safe to add any changes needed to fix this bug
from magic-odata.
Related Issues (20)
- Query functions HOT 1
- Complex sub paths HOT 1
- Negation
- Primitive literals HOT 1
- $this, $it, $root
- $root
- ODataServiceConfig is not organised correctly
- Simple and ref Parameter aliases
- @params in order by
- Add namespaces to enums HOT 1
- Generate from $metadata local file: file path is not relative to config file
- Function calls in OrderBy HOT 1
- Function call edge cases
- Serialize enums with their full value
- Allow @params in filter methods
- Add support or Geo types HOT 1
- Add fluent comparable operators
- Alternative HOT 6
- Compatibility with verbatimModuleSyntax HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magic-odata.