예제 #1
0
 internal TsVectorHandler(PostgresType postgresType) : base(postgresType)
 {
 }
예제 #2
0
 /// <inheritdoc />
 public Int16Handler(PostgresType postgresType) : base(postgresType)
 {
 }
예제 #3
0
        // Binary Format: int64 expressing microseconds, int32 expressing timezone in seconds, negative

        /// <summary>
        /// Constructs an <see cref="TimeTzHandler"/>.
        /// </summary>
        public TimeTzHandler(PostgresType postgresType) : base(postgresType)
        {
        }
예제 #4
0
 /// <inheritdoc />
 public override IRangeHandler CreateRangeHandler(PostgresType rangeBackendType)
 => throw new NotSupportedException();
예제 #5
0
 /// <inheritdoc />
 protected RangeHandler(PostgresType rangePostgresType) : base(rangePostgresType)
 {
 }
 public BoxHandler(PostgresType pgType) : base(pgType)
 {
 }
 public Int2VectorHandler(PostgresType arrayPostgresType, PostgresType postgresShortType)
     : base(arrayPostgresType, new Int16Handler(postgresShortType), ArrayNullabilityMode.Never, 0)
 {
 }
예제 #8
0
 bool TryGetMapping(PostgresType pgType, [NotNullWhen(true)] out NpgsqlTypeMapping?mapping)
 => Mappings.TryGetValue(pgType.Name, out mapping) ||
 Mappings.TryGetValue(pgType.FullName, out mapping) ||
 pgType is PostgresDomainType domain && (
예제 #9
0
 /// <inheritdoc />
 public override NpgsqlTypeHandler <string> Create(PostgresType pgType, NpgsqlConnector conn)
 => new TextHandler(pgType, conn);
예제 #10
0
 /// <inheritdoc />
 public override NpgsqlTypeHandler <Dictionary <string, string?> > Create(PostgresType postgresType, NpgsqlConnection conn)
 => new HstoreHandler(postgresType, conn);
예제 #11
0
 internal HstoreHandler(PostgresType postgresType, NpgsqlConnection connection)
     : base(postgresType) => _textHandler = new TextHandler(postgresType, connection);
예제 #12
0
 /// <inheritdoc />
 public LineHandler(PostgresType postgresType) : base(postgresType)
 {
 }
예제 #13
0
 internal BoxHandler(PostgresType postgresType) : base(postgresType)
 {
 }
예제 #14
0
 internal VoidHandler(PostgresType postgresType) : base(postgresType)
 {
 }
예제 #15
0
 public CircleHandler(PostgresType pgType) : base(pgType)
 {
 }
예제 #16
0
 /// <inheritdoc />
 protected internal TextHandler(PostgresType postgresType, NpgsqlConnector connector)
     : this(postgresType, connector.TextEncoding)
 {
 }
예제 #17
0
 internal NetTopologySuiteHandler(PostgresType postgresType, PostGisReader reader, PostGisWriter writer)
     : base(postgresType)
 {
     _reader = reader;
     _writer = writer;
 }
예제 #18
0
 /// <inheritdoc />
 protected internal TextHandler(PostgresType postgresType, Encoding encoding)
 {
     PostgresType = postgresType;
     _encoding    = encoding;
 }
예제 #19
0
 internal HstoreHandler(PostgresType postgresType, TypeHandlerRegistry registry) : base(postgresType)
 {
     _textHandler = new TextHandler(postgresType, registry);
 }
예제 #20
0
 internal override NpgsqlTypeHandler Create(PostgresType pgType, NpgsqlConnection conn)
 => new Int2VectorHandler(conn.Connector.TypeMapper.DatabaseInfo.ByName["smallint"])
 {
     PostgresType = pgType
 };
예제 #21
0
 /// <inheritdoc />
 protected ArrayHandler(PostgresType arrayPostgresType, NpgsqlTypeHandler elementHandler, int lowerBound = 1)
     : base(arrayPostgresType)
 {
     LowerBound     = lowerBound;
     ElementHandler = elementHandler;
 }
예제 #22
0
 public Int2VectorHandler(PostgresType postgresShortType)
     : base(new Int16Handler {
     PostgresType = postgresShortType
 }, 0)
 {
 }
예제 #23
0
 public SingleHandler(PostgresType pgType) : base(pgType)
 {
 }
예제 #24
0
 public override NpgsqlTypeHandler <string> Create(PostgresType postgresType, NpgsqlConnection conn)
 => new JsonbHandler(postgresType, conn, _settings);
예제 #25
0
 public DoubleHandler(PostgresType pgType) : base(pgType)
 {
 }
예제 #26
0
 public JsonbHandler(PostgresType postgresType, NpgsqlConnection connection, JsonSerializerSettings settings)
     : base(postgresType, connection, isJsonb: true) => _settings = settings;
예제 #27
0
 /// <inheritdoc />
 public override NpgsqlTypeHandler <DateTimeOffset> Create(PostgresType postgresType, NpgsqlConnector conn)
 => conn.DatabaseInfo.HasIntegerDateTimes      // Check for the legacy floating point timestamps feature
         ? new TimeTzHandler(postgresType)
         : throw new NotSupportedException($"The deprecated floating-point date/time format is not supported by {nameof(Npgsql)}.");
예제 #28
0
 public override NpgsqlTypeHandler <TEnum> Create(PostgresType postgresType, NpgsqlConnection conn)
 => new EnumHandler <TEnum>(postgresType, _enumToLabel, _labelToEnum);
예제 #29
0
 public MacaddrHandler(PostgresType pgType) : base(pgType)
 {
 }
 /// <inheritdoc />
 public BitStringArrayHandler(PostgresType postgresType, BitStringHandler elementHandler, ArrayNullabilityMode arrayNullabilityMode)
     : base(postgresType, elementHandler, arrayNullabilityMode)
 {
 }