-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathSqliteDialectBuilder.cs
More file actions
20 lines (15 loc) · 725 Bytes
/
SqliteDialectBuilder.cs
File metadata and controls
20 lines (15 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using PhenX.EntityFrameworkCore.BulkInsert.Dialect;
using PhenX.EntityFrameworkCore.BulkInsert.Metadata;
namespace PhenX.EntityFrameworkCore.BulkInsert.Sqlite;
internal class SqliteDialectBuilder : SqlDialectBuilder
{
protected override string OpenDelimiter => "\"";
protected override string CloseDelimiter => "\"";
protected override bool SupportsMoveRows => false;
/// <inheritdoc />
public override string CreateTableCopySql(string tempNameName, TableMetadata tableInfo, IReadOnlyList<ColumnMetadata> columns)
{
return $"CREATE TEMP TABLE {tempNameName} AS SELECT * FROM {tableInfo.QuotedTableName} WHERE 0;";
}
protected override string Trim(string lhs) => $"TRIM({lhs})";
}