File tree Expand file tree Collapse file tree 4 files changed +126
-0
lines changed
Rdmp.Core/EntityFramework/Models Expand file tree Collapse file tree 4 files changed +126
-0
lines changed Original file line number Diff line number Diff line change 1+ using Rdmp . Core . Curation . Data . DataLoad ;
2+ using Rdmp . Core . EntityFramework . Helpers ;
3+ using Rdmp . Core . ReusableLibraryCode . Checks ;
4+ using System ;
5+ using System . Collections . Generic ;
6+ using System . ComponentModel . DataAnnotations ;
7+ using System . Linq ;
8+ using System . Text ;
9+ using System . Threading . Tasks ;
10+
11+ namespace Rdmp . Core . EntityFramework . Models
12+ {
13+ public class ANOTable : DatabaseObject , ICheckable
14+ {
15+ [ Key ]
16+ public override int ID { get ; set ; }
17+ public string Name { get ; set ; }
18+ public int Server_ID { get ; set ; }
19+ public int NumberOfIntegersToUseInAnonymousRepresentation { get ; set ; }
20+ public int NumberOfCharactersToUseInAnonymousRepresentation { get ; set ; }
21+ public string Suffix { get ; set ; }
22+
23+ public void Check ( ICheckNotifier notifier )
24+ {
25+ throw new NotImplementedException ( ) ;
26+ }
27+ public string GetRuntimeDataType ( LoadStage stage )
28+ {
29+ return "TODO" ;
30+ }
31+ }
32+ }
Original file line number Diff line number Diff line change 1+ using Rdmp . Core . EntityFramework . Helpers ;
2+ using System ;
3+ using System . Collections . Generic ;
4+ using System . ComponentModel . DataAnnotations ;
5+ using System . Linq ;
6+ using System . Text ;
7+ using System . Threading . Tasks ;
8+
9+ namespace Rdmp . Core . EntityFramework . Models
10+ {
11+ public class CohortIdentificationConfiguration : DatabaseObject
12+ {
13+
14+ [ Key ]
15+ public override int ID { get ; set ; }
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ using Rdmp . Core . Curation . Data ;
2+ using Rdmp . Core . EntityFramework . Helpers ;
3+ using System ;
4+ using System . Collections . Generic ;
5+ using System . ComponentModel . DataAnnotations ;
6+ using System . Linq ;
7+ using System . Text ;
8+ using System . Threading . Tasks ;
9+
10+ namespace Rdmp . Core . EntityFramework . Models
11+ {
12+ public class Lookup : DatabaseObject , IJoin
13+ {
14+
15+ public int PrimaryKey_ID { get ; set ; }
16+ public int ForeignKey_ID { get ; set ; }
17+ public int Description_ID { get ; set ; }
18+
19+ public string Collation { get ; set ; }
20+ public int ExtractionJoinType { get ; set ; } //left,right,inner
21+
22+ public virtual ColumnInfo PrimaryKey { get ; set ; }
23+ public virtual ColumnInfo ForeignKey { get ; set ; }
24+ public virtual ColumnInfo DescriptionKey { get ; set ; }
25+
26+ [ Key ]
27+ public override int ID { get ; set ; }
28+ public override RDMPDbContext CatalogueDbContext { get ; set ; }
29+
30+ public override string ToString ( ) => $ "{ ForeignKey ? . Name } = { PrimaryKey ? . Name } ";
31+
32+ public IEnumerable < ISupplementalJoin > GetSupplementalJoins ( ) => CatalogueDbContext . LookupCompositeJoinInfos . Where ( ji => ji . OriginalColumnInfo_ID == this . ID ) . ToList ( ) ;
33+
34+ public ExtractionJoinType GetInvertedJoinType ( )
35+ {
36+ throw new NotImplementedException ( ) ;
37+ }
38+
39+ public string GetCustomJoinSql ( )
40+ {
41+ throw new NotImplementedException ( ) ;
42+ }
43+ }
44+ }
Original file line number Diff line number Diff line change 1+ using Rdmp . Core . Curation . Data ;
2+ using Rdmp . Core . EntityFramework . Helpers ;
3+ using System ;
4+ using System . Collections . Generic ;
5+ using System . ComponentModel . DataAnnotations ;
6+ using System . ComponentModel . DataAnnotations . Schema ;
7+ using System . Linq ;
8+ using System . Text ;
9+ using System . Threading . Tasks ;
10+
11+ namespace Rdmp . Core . EntityFramework . Models
12+ {
13+ public class LookupCompositeJoinInfo : DatabaseObject , ISupplementalJoin
14+ {
15+ [ Key ]
16+ public override int ID { get ; set ; }
17+ public int OriginalColumnInfo_ID { get ; set ; }
18+ public int ForeignKey_ID { get ; set ; }
19+ public int PrimaryKey_ID { get ; set ; }
20+ public string Collation { get ; set ; }
21+
22+
23+ [ ForeignKey ( "OriginalColumnInfo_ID" ) ]
24+ public virtual ColumnInfo OriginalColumnInfo { get ; set ; }
25+ [ ForeignKey ( "ForeignKey_ID" ) ]
26+
27+ public virtual ColumnInfo ForeignKey { get ; set ; }
28+
29+ [ ForeignKey ( "PrimaryKey_ID" ) ]
30+
31+ public virtual ColumnInfo PrimaryKey { get ; set ; }
32+ }
33+ }
You can’t perform that action at this time.
0 commit comments