• 0 Posts
  • 42 Comments
Joined 1 year ago
cake
Cake day: June 11th, 2023

help-circle





  • Thinking about C# and Dapper here 'cause they’re what I’m used to, but, for example…

    result = await connection.QueryAsync<ResultType>(QUERY); (where ResultType is a statically typed record, class, or struct shaped like the data you want returned.)

    Given a query that doesn’t return something that matches any of ResultType’s constructors, the code’ll throw an exception at runtime complaining it needs a constructor that matches whatever it’s returning, whereupon you’ll notice it isn’t asking for it to have a date parameter, so the query must not be returning it.