@@ -56,7 +56,7 @@ public interface INpgsqlTypeMapper
5656 /// </remarks>
5757 /// <param name="pgName">
5858 /// A PostgreSQL type name for the corresponding enum type in the database.
59- /// If null, the name translator given in <paramref name="nameTranslator"/>will be used.
59+ /// If null, the name translator given in <paramref name="nameTranslator"/> will be used.
6060 /// </param>
6161 /// <param name="nameTranslator">
6262 /// A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class).
@@ -89,16 +89,16 @@ bool UnmapEnum<TEnum>(
8989 /// Maps a CLR type to a PostgreSQL composite type.
9090 /// </summary>
9191 /// <remarks>
92- /// CLR fields and properties by string to PostgreSQL enum labels .
92+ /// CLR fields and properties by string to PostgreSQL names .
9393 /// The translation strategy can be controlled by the <paramref name="nameTranslator"/> parameter,
9494 /// which defaults to <see cref="NpgsqlSnakeCaseNameTranslator"/>.
95- /// You can also use the <see cref="PgNameAttribute"/> on your members to manually specify a PostgreSQL enum label .
96- /// If there is a discrepancy between the .NET and database labels while a composite is read or written,
95+ /// You can also use the <see cref="PgNameAttribute"/> on your members to manually specify a PostgreSQL name .
96+ /// If there is a discrepancy between the .NET type and database type while a composite is read or written,
9797 /// an exception will be raised.
9898 /// </remarks>
9999 /// <param name="pgName">
100- /// A PostgreSQL type name for the corresponding enum type in the database.
101- /// If null, the name translator given in <paramref name="nameTranslator"/>will be used.
100+ /// A PostgreSQL type name for the corresponding composite type in the database.
101+ /// If null, the name translator given in <paramref name="nameTranslator"/> will be used.
102102 /// </param>
103103 /// <param name="nameTranslator">
104104 /// A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class).
@@ -111,11 +111,11 @@ INpgsqlTypeMapper MapComposite<T>(
111111 INpgsqlNameTranslator ? nameTranslator = null ) ;
112112
113113 /// <summary>
114- /// Removes an existing enum mapping.
114+ /// Removes an existing composite mapping.
115115 /// </summary>
116116 /// <param name="pgName">
117117 /// A PostgreSQL type name for the corresponding composite type in the database.
118- /// If null, the name translator given in <paramref name="nameTranslator"/>will be used.
118+ /// If null, the name translator given in <paramref name="nameTranslator"/> will be used.
119119 /// </param>
120120 /// <param name="nameTranslator">
121121 /// A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class).
@@ -125,6 +125,48 @@ bool UnmapComposite<T>(
125125 string ? pgName = null ,
126126 INpgsqlNameTranslator ? nameTranslator = null ) ;
127127
128+ /// <summary>
129+ /// Maps a CLR type to a composite type.
130+ /// </summary>
131+ /// <remarks>
132+ /// Maps CLR fields and properties by string to PostgreSQL names.
133+ /// The translation strategy can be controlled by the <paramref name="nameTranslator"/> parameter,
134+ /// which defaults to <see cref="NpgsqlSnakeCaseNameTranslator"/>.
135+ /// If there is a discrepancy between the .NET type and database type while a composite is read or written,
136+ /// an exception will be raised.
137+ /// </remarks>
138+ /// <param name="compType">The .NET type to be mapped.</param>
139+ /// <param name="pgName">
140+ /// A PostgreSQL type name for the corresponding composite type in the database.
141+ /// If null, the name translator given in <paramref name="nameTranslator"/> will be used.
142+ /// </param>
143+ /// <param name="nameTranslator">
144+ /// A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class).
145+ /// Defaults to <see cref="NpgsqlSnakeCaseNameTranslator"/>
146+ /// </param>
147+ [ NotNull ]
148+ INpgsqlTypeMapper MapComposite (
149+ Type compType ,
150+ string ? pgName = null ,
151+ INpgsqlNameTranslator ? nameTranslator = null ) ;
152+
153+ /// <summary>
154+ /// Removes an existing composite mapping.
155+ /// </summary>
156+ /// <param name="compType">The .NET type to be unmapped.</param>
157+ /// <param name="pgName">
158+ /// A PostgreSQL type name for the corresponding composite type in the database.
159+ /// If null, the name translator given in <paramref name="nameTranslator"/> will be used.
160+ /// </param>
161+ /// <param name="nameTranslator">
162+ /// A component which will be used to translate CLR names (e.g. SomeClass) into database names (e.g. some_class).
163+ /// Defaults to <see cref="NpgsqlSnakeCaseNameTranslator"/>
164+ /// </param>
165+ bool UnmapComposite (
166+ Type compType ,
167+ string ? pgName = null ,
168+ INpgsqlNameTranslator ? nameTranslator = null ) ;
169+
128170 /// <summary>
129171 /// Resets all mapping changes performed on this type mapper and reverts it to its original, starting state.
130172 /// </summary>
0 commit comments