Class TempTableSource<TResult>
A lazy temporary-table materialisation: the query whose rows fill the table plus the statement options. Created by AsTempTable<TResult>(QueryCommand<TResult>, CreateTableOptions?); nothing is executed until a query reads the source through From<TResult>(IDataContext, TempTableSource<TResult>).
Reading it runs one batch — DROP TABLE IF EXISTS, CREATE TEMPORARY TABLE ... AS SELECT
and the read — on a single session, so the table is always freshly materialised and never depends on
connection pinning (safe under a connection-level pooler such as PgBouncer).
public sealed class TempTableSource<TResult>
Type Parameters
TResultThe source query's projected row type. The rows are read back through TableAlias column accessors, not through this type's mapping.
- Inheritance
-
TempTableSource<TResult>
- Inherited Members
- Extension Methods
Properties
Name
The auto-generated raw (unquoted, unconventioned) temporary-table name.
public string Name { get; }
Property Value
Options
The options of the CREATE TEMPORARY TABLE ... AS SELECT statement.
public CreateTableOptions Options { get; }