Ejemplo n.º 1
0
 internal TsVectorHandler(PostgresType postgresType) : base(postgresType)
 {
 }
Ejemplo n.º 2
0
 /// <inheritdoc />
 public Int16Handler(PostgresType postgresType) : base(postgresType)
 {
 }
Ejemplo n.º 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)
        {
        }
Ejemplo n.º 4
0
 /// <inheritdoc />
 public override IRangeHandler CreateRangeHandler(PostgresType rangeBackendType)
 => throw new NotSupportedException();
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 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 && (
Ejemplo n.º 9
0
 /// <inheritdoc />
 public override NpgsqlTypeHandler <string> Create(PostgresType pgType, NpgsqlConnector conn)
 => new TextHandler(pgType, conn);
Ejemplo n.º 10
0
 /// <inheritdoc />
 public override NpgsqlTypeHandler <Dictionary <string, string?> > Create(PostgresType postgresType, NpgsqlConnection conn)
 => new HstoreHandler(postgresType, conn);
Ejemplo n.º 11
0
 internal HstoreHandler(PostgresType postgresType, NpgsqlConnection connection)
     : base(postgresType) => _textHandler = new TextHandler(postgresType, connection);
Ejemplo n.º 12
0
 /// <inheritdoc />
 public LineHandler(PostgresType postgresType) : base(postgresType)
 {
 }
Ejemplo n.º 13
0
 internal BoxHandler(PostgresType postgresType) : base(postgresType)
 {
 }
Ejemplo n.º 14
0
 internal VoidHandler(PostgresType postgresType) : base(postgresType)
 {
 }
Ejemplo n.º 15
0
 public CircleHandler(PostgresType pgType) : base(pgType)
 {
 }
Ejemplo n.º 16
0
 /// <inheritdoc />
 protected internal TextHandler(PostgresType postgresType, NpgsqlConnector connector)
     : this(postgresType, connector.TextEncoding)
 {
 }
Ejemplo n.º 17
0
 internal NetTopologySuiteHandler(PostgresType postgresType, PostGisReader reader, PostGisWriter writer)
     : base(postgresType)
 {
     _reader = reader;
     _writer = writer;
 }
Ejemplo n.º 18
0
 /// <inheritdoc />
 protected internal TextHandler(PostgresType postgresType, Encoding encoding)
 {
     PostgresType = postgresType;
     _encoding    = encoding;
 }
Ejemplo n.º 19
0
 internal HstoreHandler(PostgresType postgresType, TypeHandlerRegistry registry) : base(postgresType)
 {
     _textHandler = new TextHandler(postgresType, registry);
 }
Ejemplo n.º 20
0
 internal override NpgsqlTypeHandler Create(PostgresType pgType, NpgsqlConnection conn)
 => new Int2VectorHandler(conn.Connector.TypeMapper.DatabaseInfo.ByName["smallint"])
 {
     PostgresType = pgType
 };
Ejemplo n.º 21
0
 /// <inheritdoc />
 protected ArrayHandler(PostgresType arrayPostgresType, NpgsqlTypeHandler elementHandler, int lowerBound = 1)
     : base(arrayPostgresType)
 {
     LowerBound     = lowerBound;
     ElementHandler = elementHandler;
 }
Ejemplo n.º 22
0
 public Int2VectorHandler(PostgresType postgresShortType)
     : base(new Int16Handler {
     PostgresType = postgresShortType
 }, 0)
 {
 }
Ejemplo n.º 23
0
 public SingleHandler(PostgresType pgType) : base(pgType)
 {
 }
Ejemplo n.º 24
0
 public override NpgsqlTypeHandler <string> Create(PostgresType postgresType, NpgsqlConnection conn)
 => new JsonbHandler(postgresType, conn, _settings);
Ejemplo n.º 25
0
 public DoubleHandler(PostgresType pgType) : base(pgType)
 {
 }
Ejemplo n.º 26
0
 public JsonbHandler(PostgresType postgresType, NpgsqlConnection connection, JsonSerializerSettings settings)
     : base(postgresType, connection, isJsonb: true) => _settings = settings;
Ejemplo n.º 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)}.");
Ejemplo n.º 28
0
 public override NpgsqlTypeHandler <TEnum> Create(PostgresType postgresType, NpgsqlConnection conn)
 => new EnumHandler <TEnum>(postgresType, _enumToLabel, _labelToEnum);
Ejemplo n.º 29
0
 public MacaddrHandler(PostgresType pgType) : base(pgType)
 {
 }
 /// <inheritdoc />
 public BitStringArrayHandler(PostgresType postgresType, BitStringHandler elementHandler, ArrayNullabilityMode arrayNullabilityMode)
     : base(postgresType, elementHandler, arrayNullabilityMode)
 {
 }