Comments (9)
I've just did a similar change to a codebase at work myself! Turns out using type aliases like this, while saving a few characters to type, can easily confuse the dev working with it.
Without the aliases it's way easier to identify that the result Donald provides is a regular Result
. Thus the user knows to not look for a DbResult
module with the expected functions and instead can just use the Result
module's functions.
Thumbs up from me as well!
from donald.
These seem very reasonable to me. 👍
from donald.
IMO for dbResult
and dbResultTask
we can use any such builder other packages specifically offer. After all, this now is just a regular result and a regular task (with a specific value type).
dbCommand
I've never personally used as I always found the pipe-able API way easier to use (and read in PR reviews).
from donald.
Yes, it would be great to get rid of DbResult
& DbResultTask
types. Currently I have to map those into Result
/Option
every time. It's not very convenient indeed.
Btw, fluent syntax saved a lot of my time when I decided replace Fumble
with Donald
in one of my projects. Big thank you for such wonderful library that is getting better with each release.
from donald.
Thanks Foggy! I agree that they are unnecessarily gratuitous (to borrow a phrase from Paul).
I'm so glad to hear that you're enjoying it. Very pleased with the evolution and this type of feedback is what keeps me motivated!
from donald.
Any specific thoughts on the computation expressions? Including even the dbCommand { }
which I regret in hindsight.
from donald.
Thank you Christopher! I appreciate the feedback. My thoughts resemble your own, on all fronts.
from donald.
👍 for dropping the aliases, and for dropping the associated computation expressions. I dislike libraries providing those sort of general-purpose cross-cutting utilities (unless that's the library's whole purpose... c.f. FSharp.Core).
But I'm on the fence about the computation expression for dbCommand
. I find the aesthetic rather pleasant. That having been said, I don't think it's critical to the library. If dropping it quantifiably improves the maintenance burden, then you should do it. 🙂
from donald.
Thanks so much Paul. I agree that the aliases and associated expressions are not great. Dropping them makes the library better for sure, at least in the sense of integrating into people's programs.
The dbCommand expression, I think you're right. It's nice syntax sugar and more importantly the original external form. I think preserving it will help ease the migration for some.
from donald.
Related Issues (20)
- GetDateTimeOffset Signature is string -> DateTime HOT 1
- Unable to execute query without a transaction HOT 6
- Add a wrapper around ExecuteScalar HOT 6
- TransactionBuilder HOT 9
- CommandBehavior.SequentialAccess causes error with SqlHydra readers HOT 5
- Cast exception when reading DateTimeOffset with System.Data.SqlClient HOT 4
- [Help] How to parse results with sequential access? HOT 2
- Db.Async.execMany throws "A command is already in progress" with NPGSQL HOT 5
- FsDto lib review HOT 2
- Who is @dysme on the landing page? HOT 3
- CancellationToken support
- Support of transaction in newCommand in Fluent syntax HOT 3
- Getting error while using Db.Async.query method HOT 6
- Require help on query HOT 7
- Support or Transition to Microsoft.Data.SqlClient HOT 3
- SQLite: What SQL Type should I choose for a JSON column? HOT 2
- Possible issue with Db.Async.exec throwing instead of returning a Result HOT 1
- How to deal with DB enums in Donald? HOT 1
- DateOnly and TimeOnly parameters
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 donald.