StringThing.FSharp
2.0.3
dotnet add package StringThing.FSharp --version 2.0.3
NuGet\Install-Package StringThing.FSharp -Version 2.0.3
<PackageReference Include="StringThing.FSharp" Version="2.0.3" />
<PackageVersion Include="StringThing.FSharp" Version="2.0.3" />
<PackageReference Include="StringThing.FSharp" />
paket add StringThing.FSharp --version 2.0.3
#r "nuget: StringThing.FSharp, 2.0.3"
#:package StringThing.FSharp@2.0.3
#addin nuget:?package=StringThing.FSharp&version=2.0.3
#tool nuget:?package=StringThing.FSharp&version=2.0.3
StringThing.FSharp
Core abstractions for the StringThing.FSharp family. Provider-agnostic. Not intended for direct use — install a provider package such as StringThing.FSharp.Sqlite.
What's in here
SqlElement<'TParameter>— DU ofLiteral of string/Parameter of 'TParameter.FragmentNode<'TParameter>— internal binary tree the providers build their statements into;Combineis O(1).SqlExecution.walk— flattens the tree, invoking provider-supplied callbacks per literal and per parameter, with a provider-specific name formatter.RowReader<'T>— opaque applicative reader overDbDataReader. Built with therow { let! ... and! ... return ... }CE.Rowmodule — column readers (Row.int64 "id",Row.stringOption "email", etc.) and the scalar shortcutsRow.scalar/Row.scalarOption.OrdinalCache— internalConcurrentDictionarykeyed on(format string, row type), populated lazily per call site.
Row reader CE
open StringThing.FSharp
type User = { Id: int64; Name: string; Email: string option }
let userRow : RowReader<User> =
row {
let! id = Row.int64 "id"
and! name = Row.string "name"
and! email = Row.stringOption "email"
return { Id = id; Name = name; Email = email }
}
The CE uses F#'s built-in applicative syntax (let! / and! — also seen in async { }, task { }, option { }). Each column reader contributes its name to a list and its read action to a chain. The provider resolves the column names to ordinals once per call site (cached), then applies the materializer chain per row.
Forgetting a column produces an error on the return line at the unbound name — local to the block.
Column readers
Row.int, Row.int64, Row.bool, Row.float, Row.string, Row.stringOption, Row.intOption, Row.int64Option, Row.guid, Row.dateTime, Row.bytes.
Scalar readers
Row.scalar<'T> and Row.scalarOption<'T> read column 0 of the result directly. Use when the query returns a single scalar:
let count : int64 =
connection.QueryStringSingle Row.scalar $"""
SELECT COUNT(*) FROM users
"""
Built by Immersus Machina
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FSharp.Core (>= 10.1.300)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on StringThing.FSharp:
| Package | Downloads |
|---|---|
|
StringThing.FSharp.MySql
Injection-safe interpolated SQL for MySQL via MySqlConnector, F# edition. Part of StringThing.FSharp. |
|
|
StringThing.FSharp.SqlClient
Injection-safe interpolated SQL for SQL Server via Microsoft.Data.SqlClient, F# edition. Part of StringThing.FSharp. |
|
|
StringThing.FSharp.Npgsql
Injection-safe interpolated SQL for PostgreSQL via Npgsql, F# edition. Part of StringThing.FSharp. |
|
|
StringThing.FSharp.Sqlite
Injection-safe interpolated SQL for SQLite, F# edition. Computation-expression SQL builder + applicative row reader. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.3 | 161 | 6/16/2026 |