Not Implemented Exception While Using SRTP
See original GitHub issueIssue Calling code similar to below will result in a Not Implemented Exception. Area of code is found here for the ‘isIn’ function https://github.com/Dzoukr/Dapper.FSharp/blob/master/src/Dapper.FSharp/MSSQL/LinqExpressionVisitors.fs#L218
Use Case I have a quite a few similar queries where I need to check for existence in various tables and other minute validations. If I am thinking about this correctly, I think adding support for SRTP would provide benefit in being able to create re-usable queries so I don’t have to create a new query for each table.
#r "nuget: Dapper.FSharp"
open Dapper.FSharp
open Dapper.FSharp.MSSQL
open System.Data
[<CLIMutable>]
type Person =
{
Id : int
}
[<CLIMutable>]
type Dog =
{
Id : int
}
let people = table'<Person> "People"
let dogs = table'<Dog> "Dogs"
let inline getIds<'T
when 'T: (member Id : int)>
(ids : int list)
(querySource : QuerySource<'T>)
(conn : IDbConnection)
= async {
// This is required in order to use SRTP w/ the query builder
let getId (item : 'T) = item.Id
let query = select {
for row in querySource do
where (isIn (getId row) ids)
}
return! conn.SelectAsync<'T>(query) |> Async.AwaitTask
}
Issue Analytics
- State:
- Created 2 months ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
NotImplementedException Class (System)
The NotImplementedException exception is thrown when a particular method, get accessor, or set accessor is present as a member of a type but...
Read more >c# - System.NotImplementedException error
This is code in your solution; so on your page, your method is likely not implemented. Share.
Read more >SRTP Configuration and Troubleshooting
Authentication provides assurance that packets are from the purported source, and that the packets have not been tampered with during transmission. Encryption ...
Read more >Issues with DTLS-SRTP setup
I've recently started working on getting the existing Asterisk 11 DTLS-SRTP implementation to work with Chrome and Firefox WebRTC implementations.
Read more >Oops, error creating inbound SRTP session for component ...
It's a libsrtp error in srtp_create . First of all, try master, as lines in dtls.c don't match. Have you also checked if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, that makes sense. Thank you so much for your help!
Personally, I will always opt for an extra type or function over SRTP for simplicity. I think using an anonymous record would be the better play in this case: