Skip to content

Commit 52385b6

Browse files
updates
1 parent acbbb6d commit 52385b6

File tree

2 files changed

+70
-17
lines changed

2 files changed

+70
-17
lines changed

src/Ydb.Sdk/src/Ado/Transaction/TransactionMode.cs

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@ namespace Ydb.Sdk.Ado;
88
/// <remarks>
99
/// TransactionMode defines the isolation level and consistency guarantees
1010
/// for database operations within a transaction.
11+
///
12+
/// For more information about YDB transaction modes, see:
13+
/// <see href="https://ydb.tech/docs/en/concepts/transactions">YDB Transactions Documentation</see>
1114
/// </remarks>
1215
public enum TransactionMode
1316
{
1417
/// <summary>
1518
/// Serializable read-write transaction mode.
1619
/// </summary>
1720
/// <remarks>
18-
/// Provides the highest isolation level with full ACID guarantees.
19-
/// All reads and writes are serializable, ensuring complete consistency.
21+
/// Provides the strictest isolation level for custom transactions.
22+
/// Guarantees that the result of successful parallel transactions is equivalent
23+
/// to their serial execution, with no read anomalies for successful transactions.
2024
/// This is the default mode for read-write operations.
2125
/// </remarks>
2226
SerializableRw,
@@ -25,8 +29,9 @@ public enum TransactionMode
2529
/// Snapshot read-only transaction mode.
2630
/// </summary>
2731
/// <remarks>
28-
/// Provides a consistent snapshot of the database at a specific point in time.
29-
/// All reads within the transaction see the same consistent state.
32+
/// All read operations within the transaction access the database snapshot.
33+
/// All data reads are consistent. The snapshot is taken when the transaction begins,
34+
/// meaning the transaction sees all changes committed before it began.
3035
/// Only read operations are allowed.
3136
/// </remarks>
3237
SnapshotRo,
@@ -35,8 +40,9 @@ public enum TransactionMode
3540
/// Stale read-only transaction mode.
3641
/// </summary>
3742
/// <remarks>
38-
/// Allows reading potentially stale data for better performance.
39-
/// Provides eventual consistency guarantees but may return outdated information.
43+
/// Read operations within the transaction may return results that are slightly
44+
/// out-of-date (lagging by fractions of a second). Each individual read returns
45+
/// consistent data, but no consistency between different reads is guaranteed.
4046
/// Only read operations are allowed.
4147
/// </remarks>
4248
StaleRo,
@@ -45,8 +51,10 @@ public enum TransactionMode
4551
/// Online read-only transaction mode.
4652
/// </summary>
4753
/// <remarks>
48-
/// Provides real-time read access with strong consistency.
49-
/// Reads the most recent committed data without allowing inconsistent reads.
54+
/// Each read operation in the transaction reads the data that is most recent
55+
/// at execution time. Each individual read operation returns consistent data,
56+
/// but no consistency is guaranteed between reads. Reading the same table range
57+
/// twice may return different results.
5058
/// Only read operations are allowed.
5159
/// </remarks>
5260
OnlineRo,
@@ -55,8 +63,10 @@ public enum TransactionMode
5563
/// Online inconsistent read-only transaction mode.
5664
/// </summary>
5765
/// <remarks>
58-
/// Provides real-time read access but allows inconsistent reads for better performance.
59-
/// May return data from different points in time within the same transaction.
66+
/// Each read operation in the transaction reads the data that is most recent
67+
/// at execution time. Even the data fetched by a particular read operation may
68+
/// contain inconsistent results. This mode provides the highest performance
69+
/// but the lowest consistency guarantees.
6070
/// Only read operations are allowed.
6171
/// </remarks>
6272
OnlineInconsistentRo

src/Ydb.Sdk/src/Ado/YdbType/YdbDbType.cs

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,25 @@
33
namespace Ydb.Sdk.Ado.YdbType;
44

55
/// <summary>
6-
/// See <a href="https://ydb.tech/docs/en/yql/reference/types/primitive">YDB Primitive Types</a> for details.
6+
/// Specifies the data type of the <see cref="YdbParameter"/>.
77
/// </summary>
8+
/// <remarks>
9+
/// YdbDbType represents the primitive data types supported by YDB.
10+
///
11+
/// For more information about YDB primitive types, see:
12+
/// <see href="https://ydb.tech/docs/en/yql/reference/types/primitive">YDB Primitive Types Documentation</see>
13+
/// </remarks>
814
public enum YdbDbType
915
{
16+
/// <summary>
17+
/// Unspecified data type.
18+
/// </summary>
19+
/// <remarks>
20+
/// When this type is used, the <see cref="YdbParameter"/> tries to automatically determine
21+
/// the appropriate YDB data type based on the system type of the parameter value.
22+
/// This provides convenience, but it may not always match the intended YDB type and
23+
/// doesn't support null values.
24+
/// </remarks>
1025
Unspecified,
1126

1227
/// <summary>
@@ -79,13 +94,13 @@ public enum YdbDbType
7994
Double,
8095

8196
/// <summary>
82-
/// A real number with the specified precision, 16 bytes in size.
83-
/// Precision is the maximum total number of decimal digits stored and can range from 1 to 35.
84-
/// Scale is the maximum number of decimal digits stored
85-
/// to the right of the decimal point and can range from 0 to the precision value.
97+
/// Represents a fixed-point real number type with user-specified precision and scale, stored in 16 bytes.
98+
/// Precision is the maximum total number of decimal digits stored (1 to 35).
99+
/// Scale is the number of decimal digits to the right of the decimal point (0 to the precision value).
86100
/// </summary>
87101
/// <remarks>
88-
/// Precision and Scale are specified in the <see cref="Ydb.Sdk.Ado.YdbParameter"/>.
102+
/// Precision and Scale must be specified in <see cref="Ydb.Sdk.Ado.YdbParameter"/>.
103+
/// If not specified, the default values (precision: 22, scale: 9) are used.
89104
/// </remarks>
90105
Decimal,
91106

@@ -164,16 +179,44 @@ public enum YdbDbType
164179
/// </summary>
165180
/// <remarks>
166181
/// Value range: From -136 years to +136 years. Internal representation: Signed 64-bit integer.
167-
/// Can't be used in the primary key.
168182
/// </remarks>
169183
Interval,
170184

185+
/// <summary>
186+
/// Date with extended range, precision to the day.
187+
/// </summary>
188+
/// <remarks>
189+
/// Extended range date type that supports dates before 01.01.1970 and beyond the standard Date range.
190+
/// Provides better support for historical dates and future dates.
191+
/// </remarks>
171192
Date32,
172193

194+
/// <summary>
195+
/// Date/time with extended range, precision to the second.
196+
/// </summary>
197+
/// <remarks>
198+
/// Extended range datetime type that supports date/time values before 01.01.1970 and
199+
/// beyond the standard Datetime range.
200+
/// Provides better support for historical timestamps and future timestamps.
201+
/// </remarks>
173202
Datetime64,
174203

204+
/// <summary>
205+
/// Date/time with extended range, precision to the microsecond.
206+
/// </summary>
207+
/// <remarks>
208+
/// Extended range timestamp type that supports microsecond-precision timestamps
209+
/// before 01.01.1970 and beyond the standard Timestamp range. Provides better support for historical and future timestamps.
210+
/// </remarks>
175211
Timestamp64,
176212

213+
/// <summary>
214+
/// Time interval with extended range, precision to microseconds.
215+
/// </summary>
216+
/// <remarks>
217+
/// Extended range interval type that supports larger time intervals
218+
/// beyond the standard Interval range.
219+
/// </remarks>
177220
Interval64
178221
}
179222

0 commit comments

Comments
 (0)