Craig's Utility Library  4.0 Beta
Utilities.ORM.Manager.QueryProvider.Default.SQLServer.SQLServerGenerator< T > Class Template Reference

SQL Server generator More...

Inheritance diagram for Utilities.ORM.Manager.QueryProvider.Default.SQLServer.SQLServerGenerator< T >:
Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >

Public Member Functions

 SQLServerGenerator (SQLServerQueryProvider QueryProvider, ISourceInfo Source, IMapping Mapping, Graph< IMapping > Structure)
 Constructor More...
 
IBatch All (params IParameter[] Parameters)
 Generates a batch that will get all items for the given type the parameters specified More...
 
IBatch All (int Limit, params IParameter[] Parameters)
 Generates a batch that will get all items for the given type the parameters specified More...
 
IBatch Any (params IParameter[] Parameters)
 Generates a batch that will get the first item that satisfies the parameters specified More...
 
IBatch Delete (T Object)
 Generates a batch that will delete the object More...
 
IBatch Delete (IEnumerable< T > Objects)
 Generates a batch that will delete the object More...
 
IBatch Insert (T Object)
 Generates a batch that will insert the data from the object More...
 
IBatch Insert (IEnumerable< T > Objects)
 Generates a batch that will insert the data from the objects More...
 
IBatch JoinsDelete< P > (IProperty< T, P > Property, T Object)
 Deletes items from the joining table for the property More...
 
IBatch JoinsSave< P, ItemType > (IProperty< T, P > Property, T Object)
 Saves items to the joining table for the property More...
 
IBatch LoadProperty< P > (T Object, IProperty Property)
 Generates a batch that will get the specific property for the object More...
 
IBatch PageCount (int PageSize, params IParameter[] Parameters)
 Generates a batch that will get the number of pages for a given page size given the parameters specified More...
 
IBatch Paged (int PageSize, int CurrentPage, string OrderBy, params IParameter[] Parameters)
 Generates a batch that will get a specific page of data that satisfies the parameters specified More...
 
IBatch Save< PrimaryKeyType > (T Object)
 Saves the object to the source More...
 
void SetupCommands (IMapping< T > Mapping)
 Sets up the various default commands for the mapping More...
 
void SetupLoadCommands< D > (Mapper.Default.Map< T, D > Property)
 Sets up the default load command for a map property More...
 
void SetupLoadCommands< D > (Mapper.Default.IEnumerableManyToOne< T, D > Property)
 Sets up the default load command for a IEnumerableManyToOne property More...
 
void SetupLoadCommands< D > (Mapper.Default.ListManyToOne< T, D > Property)
 Sets up the default load command for a ListManyToOne property More...
 
void SetupLoadCommands< D > (Mapper.Default.ListManyToMany< T, D > Property)
 Sets up the default load command for a ListManyToMany property More...
 
void SetupLoadCommands< D > (Mapper.Default.ManyToOne< T, D > Property)
 Sets up the default load command for a ManyToOne property More...
 
void SetupLoadCommands< D > (Mapper.Default.ManyToMany< T, D > Property)
 Sets up the default load command for a ManyToMany property More...
 
void SetupLoadCommands< D > (Mapper.Default.IListManyToMany< T, D > Property)
 Sets up the default load command for a map property More...
 
void SetupLoadCommands< D > (Mapper.Default.IListManyToOne< T, D > Property)
 Sets up the default load command for a map property More...
 
void SetupLoadCommands< D > (Mapper.Default.ICollectionManyToMany< T, D > Property)
 Sets up the default load command for a map property More...
 
void SetupLoadCommands< D > (Mapper.Default.ICollectionManyToOne< T, D > Property)
 Sets up the default load command for a map property More...
 
IBatch Update (T Object)
 Generates a batch that will update the data from the object More...
 
IBatch Update (IEnumerable< T > Objects)
 Generates a batch that will update the data from the objects More...
 
- Public Member Functions inherited from Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >
void SetupLoadCommands< D > (Map< T, D > Property)
 Sets up the default load command for a map property More...
 
void SetupLoadCommands< D > (IEnumerableManyToOne< T, D > Property)
 Sets up the default load command for a IEnumerableManyToOne property More...
 
void SetupLoadCommands< D > (ListManyToOne< T, D > Property)
 Sets up the default load command for a ListManyToOne property More...
 
void SetupLoadCommands< D > (ListManyToMany< T, D > Property)
 Sets up the default load command for a ListManyToMany property More...
 
void SetupLoadCommands< D > (IListManyToMany< T, D > Property)
 Sets up the default load command for a ListManyToMany property More...
 
void SetupLoadCommands< D > (IListManyToOne< T, D > Property)
 Setups the load commands. More...
 
void SetupLoadCommands< D > (ICollectionManyToMany< T, D > Property)
 Sets up the default load command for a ListManyToMany property More...
 
void SetupLoadCommands< D > (ICollectionManyToOne< T, D > Property)
 Setups the load commands. More...
 
void SetupLoadCommands< D > (ManyToMany< T, D > Property)
 Sets up the default load command for a ManyToMany property More...
 
void SetupLoadCommands< D > (ManyToOne< T, D > Property)
 Sets up the default load command for a ManyToOne property More...
 

Properties

IMapping Mapping [get]
 Mapping that the generator uses More...
 
SQLServerQueryProvider QueryProvider [get]
 Query provider that the system uses More...
 
ISourceInfo Source [get]
 Source used to connect More...
 
Graph< IMappingStructure [get]
 Gets the structure. More...
 

Detailed Description

SQL Server generator

Template Parameters
TClass type
Type Constraints
T :class 

Definition at line 41 of file SQLServerGenerator.cs.

Constructor & Destructor Documentation

Constructor

Parameters
QueryProviderQuery provider
SourceSource info
MappingMapping info
StructureThe structure.

Definition at line 51 of file SQLServerGenerator.cs.

Member Function Documentation

Generates a batch that will get all items for the given type the parameters specified

Parameters
ParametersParameters
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 85 of file SQLServerGenerator.cs.

Generates a batch that will get all items for the given type the parameters specified

Parameters
ParametersParameters
LimitMax number of items to return
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 106 of file SQLServerGenerator.cs.

Generates a batch that will get the first item that satisfies the parameters specified

Parameters
ParametersParameters
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 130 of file SQLServerGenerator.cs.

Generates a batch that will delete the object

Parameters
ObjectObject to delete
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 150 of file SQLServerGenerator.cs.

Generates a batch that will delete the object

Parameters
ObjectsObjects to delete
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 166 of file SQLServerGenerator.cs.

Generates a batch that will insert the data from the object

Parameters
ObjectObject to insert
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 181 of file SQLServerGenerator.cs.

Generates a batch that will insert the data from the objects

Parameters
ObjectsObjects to insert
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 200 of file SQLServerGenerator.cs.

IBatch Utilities.ORM.Manager.QueryProvider.Default.SQLServer.SQLServerGenerator< T >.JoinsDelete< P > ( IProperty< T, P >  Property,
Object 
)

Deletes items from the joining table for the property

Parameters
PropertyProperty
ObjectObject
Template Parameters
PProperty type
Returns
The batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 217 of file SQLServerGenerator.cs.

IBatch Utilities.ORM.Manager.QueryProvider.Default.SQLServer.SQLServerGenerator< T >.JoinsSave< P, ItemType > ( IProperty< T, P >  Property,
Object 
)

Saves items to the joining table for the property

Parameters
PropertyProperty
ObjectObject
Template Parameters
PProperty type
ItemTypeItem type
Returns
The batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 257 of file SQLServerGenerator.cs.

Generates a batch that will get the specific property for the object

Template Parameters
PProperty type
Parameters
ObjectObject to get the property for
PropertyProperty to get
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 345 of file SQLServerGenerator.cs.

IBatch Utilities.ORM.Manager.QueryProvider.Default.SQLServer.SQLServerGenerator< T >.PageCount ( int  PageSize,
params IParameter[]  Parameters 
)

Generates a batch that will get the number of pages for a given page size given the parameters specified

Parameters
ParametersParameters
PageSizePage size
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 361 of file SQLServerGenerator.cs.

IBatch Utilities.ORM.Manager.QueryProvider.Default.SQLServer.SQLServerGenerator< T >.Paged ( int  PageSize,
int  CurrentPage,
string  OrderBy,
params IParameter[]  Parameters 
)

Generates a batch that will get a specific page of data that satisfies the parameters specified

Parameters
PageSizePage size
CurrentPageThe current page (starting at 0)
OrderByThe order by portion of the query
ParametersParameters
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 385 of file SQLServerGenerator.cs.

Saves the object to the source

Template Parameters
PrimaryKeyTypePrimary key type
Parameters
ObjectObject to save

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 414 of file SQLServerGenerator.cs.

Sets up the various default commands for the mapping

Parameters
Mapping

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 442 of file SQLServerGenerator.cs.

Sets up the default load command for a map property

Template Parameters
DData type
Parameters
PropertyMap property
Type Constraints
D :class 

Definition at line 457 of file SQLServerGenerator.cs.

Sets up the default load command for a IEnumerableManyToOne property

Template Parameters
DData type
Parameters
PropertyIEnumerableManyToOne property
Type Constraints
D :class 

Definition at line 480 of file SQLServerGenerator.cs.

Sets up the default load command for a ListManyToOne property

Template Parameters
DData type
Parameters
PropertyListManyToOne property
Type Constraints
D :class 

Definition at line 504 of file SQLServerGenerator.cs.

Sets up the default load command for a ListManyToMany property

Template Parameters
DData type
Parameters
PropertyListManyToMany property
Type Constraints
D :class 

Definition at line 528 of file SQLServerGenerator.cs.

Sets up the default load command for a ManyToOne property

Template Parameters
DData type
Parameters
PropertyManyToOne property
Type Constraints
D :class 

Definition at line 552 of file SQLServerGenerator.cs.

Sets up the default load command for a ManyToMany property

Template Parameters
DData type
Parameters
PropertyManyToMany property
Type Constraints
D :class 

Definition at line 576 of file SQLServerGenerator.cs.

Sets up the default load command for a map property

Template Parameters
DData type
Parameters
PropertyMap property
Type Constraints
D :class 

Definition at line 600 of file SQLServerGenerator.cs.

Sets up the default load command for a map property

Template Parameters
DData type
Parameters
PropertyMap property
Type Constraints
D :class 

Definition at line 624 of file SQLServerGenerator.cs.

Sets up the default load command for a map property

Template Parameters
DData type
Parameters
PropertyMap property
Type Constraints
D :class 

Definition at line 647 of file SQLServerGenerator.cs.

Sets up the default load command for a map property

Template Parameters
DData type
Parameters
PropertyMap property
Type Constraints
D :class 

Definition at line 671 of file SQLServerGenerator.cs.

Generates a batch that will update the data from the object

Parameters
ObjectObject to update
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 695 of file SQLServerGenerator.cs.

Generates a batch that will update the data from the objects

Parameters
ObjectsObjects to update
Returns
Batch with the appropriate commands

Implements Utilities.ORM.Manager.QueryProvider.Interfaces.IGenerator< T >.

Definition at line 712 of file SQLServerGenerator.cs.

Property Documentation

Mapping that the generator uses

Definition at line 62 of file SQLServerGenerator.cs.

Query provider that the system uses

Definition at line 67 of file SQLServerGenerator.cs.

Source used to connect

Definition at line 72 of file SQLServerGenerator.cs.

Gets the structure.

The structure.

Definition at line 78 of file SQLServerGenerator.cs.


The documentation for this class was generated from the following file: