Comments (6)
Really nice!
And yes, I also use this library (in my toy project) IDocumentSession
as the last parameters.
And this is my function chains as an example.
from marten.fsharp.
Looks great! Though personally, I still don't get when I have to use IQuerySession
and IDocumentSession
. Perhaps those two can be separated like in Marten's doc.
// query, read, write, etc.
let query<'a> (session : IDocumentSession) =
session.Query<'a>()
// just query without write.
let query<'a> (session : IQuerySession) =
session.Query<'a>()
from marten.fsharp.
I've never used IQuerySession
before. I guess it's for scenarios which you don't want to accidentally save things. I guess since IDocumentSession
inherits from IQuerySession we can just change the query
function to IQuerySession
and won't matter if you pass in either.
from marten.fsharp.
Ok I just changed all the read functions like query
and load
to IQuerySession
baa78c4
from marten.fsharp.
Also should I move all the IDocumentSession
parameters to be first or last? https://fsharpforfunandprofit.com/posts/partial-application/#designing-functions-for-partial-application
session
|> loadByIntAsync<Person> 42
or
42
|> loadByIntAsync<Person> session
from marten.fsharp.
Ok moved to last param in 50754fc
from marten.fsharp.
Related Issues (19)
- Yak Shave: Move tests to expecto
- Using F# Record types as named parameters HOT 1
- IsOneOf failing in filter
- Document APIs
- Turn Async calls cold
- Expose Cancellation
- Inconsistent naming
- Flesh out Patch Api
- Add support for new IQueryable functions that Marten supports
- Marten.Fsharp should support Foreign Key expressions
- Is this still maintained? HOT 3
- Marten Discriminated Union as Event Type or Each Discriminated Union Case as Event Type? HOT 4
- A more functional way of including related documents HOT 3
- Migrate quotations to anonymous functions HOT 8
- Add more pipeline opportunities HOT 1
- Query builder HOT 2
- Allow Querying with Sql
- Incorrect index created for Datetime option HOT 5
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 marten.fsharp.