/
dev-npgsql
/
npgsql
Обзор
Документация
Войти
/
dev-npgsql
/
npgsql
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Npgsql/PostgresTypes/PostgresArrayType.cs
46 строк
2 KB
Nino Floris
Remove obsolete UTF-8 BOMs (#6542)
13 апр 2026, 17:13
Не верифицирован
13 апр 2026, 17:13
5225216
Код
Авторство
О чём код?
using Npgsql.Internal.Postgres; namespace Npgsql.PostgresTypes; /// <summary> /// Represents a PostgreSQL array data type, which can hold several multiple values in a single column. /// </summary> /// <remarks> /// See https://www.postgresql.org/docs/current/static/arrays.html. /// </remarks> public class PostgresArrayType : PostgresType { /// <summary> /// The PostgreSQL data type of the element contained within this array. /// </summary> public PostgresType Element { get; } /// <summary> /// Constructs a representation of a PostgreSQL array data type. /// </summary> protected internal PostgresArrayType(string ns, string name, uint oid, PostgresType elementPostgresType) : base(ns, name, oid) { Element = elementPostgresType; Element.Array = this; } /// <summary> /// Constructs a representation of a PostgreSQL array data type. /// </summary> internal PostgresArrayType(DataTypeName dataTypeName, Oid oid, PostgresType elementPostgresType) : base(dataTypeName, oid) { Element = elementPostgresType; Element.Array = this; } // PostgreSQL array types have an underscore-prefixed name (_text), but we // want to return the public text[] instead /// <inheritdoc/> internal override string GetPartialNameWithFacets(int typeModifier) => Element.GetPartialNameWithFacets(typeModifier) + "[]"; internal override PostgresFacets GetFacets(int typeModifier) => Element.GetFacets(typeModifier); }