forked from npgsql/npgsql
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathNpgsqlDataSourceInformation.cs
More file actions
46 lines (43 loc) · 1.52 KB
/
NpgsqlDataSourceInformation.cs
File metadata and controls
46 lines (43 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/********************************************************
* ADO.NET 2.0 Data Provider for SQLite Version 3.X
* Written by Robert Simpson (robert@blackcastlesoft.com)
*
* Released to the public domain, use at your own risk!
********************************************************/
namespace Npgsql.Designer
{
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.VisualStudio.Data;
using Microsoft.VisualStudio.Data.AdoDotNet;
/// <summary>
/// Provides basic DataSourceInformation about the underlying connection
/// </summary>
internal sealed class NpgsqlDataSourceInformation : AdoDotNetDataSourceInformation
{
public NpgsqlDataSourceInformation(DataConnection connection) : base(connection)
{
Initialize();
}
private void Initialize()
{
AddProperty(DefaultSchema);
AddProperty(DefaultCatalog, "public");
AddProperty(SupportsAnsi92Sql, true);
AddProperty(SupportsQuotedIdentifierParts, true);
AddProperty(IdentifierOpenQuote, "\"");
AddProperty(IdentifierCloseQuote, "\"");
AddProperty(CatalogSeparator, ".");
AddProperty(CatalogSupported, true);
AddProperty(CatalogSupportedInDml, true);
AddProperty(SchemaSupported, true);
AddProperty(SchemaSupportedInDml, true);
AddProperty(SchemaSeparator, ".");
AddProperty(ParameterPrefix, "@");
AddProperty(ParameterPrefixInName, true);
//AddProperty("DeskTopDataSource", true);
//AddProperty("LocalDatabase", true);
}
}
}