-
Notifications
You must be signed in to change notification settings - Fork 0
/
SnowflakeJoinAttribute.cs
95 lines (80 loc) · 2.48 KB
/
SnowflakeJoinAttribute.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//-----------------------------------------------------------------------
// <copyright file="SnowflakeJoinAttribute.cs" company="Jonas Schubert">
// Copyright (c) Jonas Schubert. All rights reserved.
// </copyright>
// <author>Jonas Schubert</author>
//-----------------------------------------------------------------------
namespace Snowflake.Data.Xt;
/// <summary>
/// The snowflake join attribute.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public sealed class SnowflakeJoinAttribute : Attribute
{
/// <summary>
/// Defines a join of type CROSS.
/// </summary>
public const string Cross = "CROSS";
/// <summary>
/// Defines a join of type FULL.
/// </summary>
public const string Full = "FULL";
/// <summary>
/// Defines a join of type FULL OUTER.
/// </summary>
public const string FullOuter = "FULL OUTER";
/// <summary>
/// Defines a join of type INNER.
/// </summary>
public const string Inner = "INNER";
/// <summary>
/// Defines a join of type LEFT.
/// </summary>
public const string Left = "LEFT";
/// <summary>
/// Defines a join of type LEFT OUTER.
/// </summary>
public const string LeftOuter = "LEFT OUTER";
/// <summary>
/// Defines a join of type NATURAL.
/// </summary>
public const string Natural = "NATURAL";
/// <summary>
/// Defines a join of type RIGHT.
/// </summary>
public const string Right = "RIGHT";
/// <summary>
/// Defines a join of type RIGHT OUTER.
/// </summary>
public const string RightOuter = "RIGHT OUTER";
/// <summary>
/// Initializes a new instance of the <see cref="SnowflakeJoinAttribute"/> class.
/// </summary>
/// <param name="table">The table.</param>
/// <param name="alias">The alias.</param>
/// <param name="type">The type.</param>
/// <param name="condition">The condition.</param>
public SnowflakeJoinAttribute(string table, string alias, string type, string condition)
{
this.Table = table;
this.Alias = alias;
this.Type = type;
this.Condition = condition;
}
/// <summary>
/// Gets the alias.
/// </summary>
public string Alias { get; internal set; }
/// <summary>
/// Gets the condition.
/// </summary>
public string Condition { get; }
/// <summary>
/// Gets the table.
/// </summary>
public string Table { get; }
/// <summary>
/// Gets the type.
/// </summary>
public string Type { get; }
}