Find all "//", Subfolders, Keep modified files open, Find Results 2, Entire Solution, "*.*"
// TODO: Currently, the expression tree is visited by a
// string builder only. I wanted to avoid the visitor pattern
// I would like some kind of event based visitor approach.
// In visitor, double[or more] dispatch is the rule of the day,
// and when you start to add in complex conversions that
// are database specific, you get triple and quadruple dispatch.
// e.g. for stored procedures and parametric queries, I want
// new Expression("Name", "=", "Jef") to translate into
// "Name = @Name", where a IDbDataParameter (@Name, "Jef")
// is created
// This gets very awkward to implement cleanly, especially in
// light of things like where clauses, etc.
// The queries need to use parametric sql to support the best
// practice approach to avoiding sql injections attacks.
// doesn't work with type object.
// public static implicit operator Operand(object o)
// {
// return new Operand(o);
// }
//
// public static explicit operator object(Operand o)
// {
// return o == null ? null : o.Value;
// }
// TODO: Simple queries should work seamlessly with SameTableAssociations as well
// would need to be careful about recursive tables (i.e. adjacency models)
// only support configuring sql for fully metadata configured databases rather than individual
// maps, because configuring at the map level causes some dependency issues, especially with
// foreign keys being added to Child maps in the case of BackwardAssociation and Collection
// see Improving.Persistence.Metadata.Configurator.AssociateBackward or
// Improving.Persistence.Metadata.Configurator.AssociateMany for examples of where the dependencies
// occur
// TODO: Convert to stored procedures
//TODO: remove the sql2k-ism
// TODO: Doesn't support composite primary keys!
// TODO: Generate stored procedure for insert and delete
// TODO: Drop foreign keys from associative table to each of the mapped tables
// TODO: Add foreign keys from associative table to each mapped table
// TODO: This is currently coupled to the command adapter by assumption only
// would be nice if the two of these played well together
// (Note: I don't know exactly what I meant by this TODO: comment)
// TODO: Move this to the IMap
// TODO: could change this to be if map has id, then use that,
// else, if map has unique properties, then use that
// else, use all
// OR --
// just don't create it if the id doesn't exist
// btw -- disassociation for 1-1s is going to be hard. Could use the proxy generator.
//TODO: remove the sql2k-ism
// TODO: Consider ditching this class and the FindChildByParentBuilder class in favor of
// the generic FindByParameterBuilder. Also, consider renaming that to FindByPropertyBuilder
// TODO: invert control here. This code needs to be
// cleaned up. It doesn't currently support composite keys.
// TODO: Note that this implementation needs to be dependent on the identity strategy
// e.g. if the class doesn't have an identity column, the last statement is not valid.
// Remove sql2k-ism
/// <summary>
/// Implement this interface and pass instance to constructor of CommandAdapterFactory.
/// </summary>
// TODO: We explicitly assume that the names of the columns match on the two tables
// TODO: the expression creation code is copied from StatementBuilder
// "Don't repeat yourself"
// Also, fix the sql2k-ism
// This method assumes that the property is atomic, e.g. that it isn't a SameTableAssociation
// TODO: actually fill this object back up
// TODO: Load as it exists here is a bit restricting, because it limits the
// collection types to just IList implementors
// We want to be able to allow this differentiation to occur somewhere else,
// e.g. hanging somewhere off of Collection, so that we can support
// IDictionary, Queue, Stack, NameValueCollection, and friends
// TODO: I would really rather see this IdentityStrategy kept at the
// Map Identity level, but I currently don't because I don't want to pollute
// Property with an IdentityStrategy for ordinary properties, and
// I would also need to add the identity strategy for same table mappings
// as well
// Don't implement the property, because the Reflection.Emit libraries do not emit the property
// with the 'instance' attribute.
// e.g. the property IL looks like:
//
// property <IL Type> <Property Name>
//
// rather than
//
// property instance <IL Type> <Property Name>
//
// Overriding the property method implementations seems to get the desired effect, however.
// TODO: I added a hack here to quote the default string value. This is something that really needs to be
// handled somewhere in the Improving.DataProvider classes and their extensions, especially since conversion to
// the ddl and sql is database-specific
// Insert additional code to be run only when inserting values.
// Insert additional code to be run only when removing values.
// Insert additional code to be run only when setting values.
// First, we'll define the behavior of the "get" property for CustomerName as a method.
// Now, we'll define the behavior of the "set" property for CustomerName.
// Last, we must map the two methods created above to our PropertyBuilder to
// their corresponding behaviors, "get" and "set" respectively.
// Note that when invoking a property, you need to use the proper BindingFlags -
// BindingFlags.SetProperty when you invoke the "set" behavior, and
// BindingFlags.GetProperty when you invoke the "get" behavior. Also note that
// we invoke them based on the name we gave the property, as expected, and not
// the name of the methods we bound to the specific property behaviors.
// --- O U T P U T ---
// The output should be as follows:
// -------------------
// Property 'System.String CustomerName [System.String]' created!
// ---
// The customerName field of instance custData has been set to 'Joe User'.
// -------------------
// Insert additional code to be run only when inserting values.
// Insert additional code to be run only when removing values.
// Insert additional code to be run only when setting values.
// TODO: need to make all of these mappings work.
// AddDataType(typeof(System.DateTime),DbType.DateTime, "smalldatetime");
// AddDataType(typeof(System.DateTime),DbType.DateTime, "timestamp");
// AddDataType(typeof(System.String),DbType.String, "varchar");
// AddDataType(typeof(System.String),DbType.String, "ntext");
// AddDataType(typeof(System.String),DbType.String, "text");
name.CodeBase = @"file:///c:\";
// not sure this works as desired
// probably should propogate the transaction scope [somehow]
// refactoring notes:
// need provider for dialect (to come...)
// need map for ntuple dispatch
// don't need any System.Data specific bits
// other than commandtype
// TODO: proper logging
// TODO: Eval performance of this versus filling a DataSet
//TODO: The DataReaderStrategy ought to be pluggable
// TODO: Push IdentityStrategy into a special IdProperty class.
// IdProperty 1 ---> 1 IProperty
// Just a simple decorator
// TODO: Push IdentityStrategy into a special IdProperty class.
// IdProperty 1 ---> 1 IProperty
// Just a simple decorator
// TODO: Rename the file.
// TODO: Could potentially want to specify the Concrete Type here in the case of
// the Property Type being an abstract or at least base class.
// TODO: I have seriously considered using the metadata attributes as the embodiment of
// the mapping behavior. In this case, the only immediately obvious benefits are that
// you do not have separate metadata in the map heirarchy *and* the attributes
// and you don't have a hashtable lookup by type, though you do have a custom attribute
// lookup by type, the relative cost of which I am not sure of, and which, in the worst case
// would be mitigated by caching the results in a type indexed hashtable (heh).
// The thing I like about it is that I don't have to duplicate the heirarchy of the object graph
// in the mapping structure. I think that it is a good science fair project for later
// e.g. create a set of metadata attributes on a type that allows you to attach arbitrary behaviors
// to them
// The runtime performance would probably suck donkey balls, though.
/// <summary>
/// If the PersistentName is not provided, the PropertyName is used in it's place
/// If the DatabaseType is not provided, it defaults to the ADO Provider-specific default mapping for the type
/// Required defaults to true
/// Unique defaults to false
///
/// </summary>
// TODO: We currently asssume that the fk names are going to match on
// each table. That will be a problem later, but ignore it for now.
//
// TODO: Continue to grow this interface and then diff with IProperty, Association
// see if there is an appropriate refactoring
// TODO: maybe this load strategy should only be used by
// Associations, though esoteric things like text or blobs
// might need to be deferred from time to time
// TODO: We want this to add AssociativeTable parameters when inserting the associative table record
// but not when we are doing a regular
// TODO: If the backward association is navigated via an associative table,
// and the lifetimes of the two objects in the relationship are managed independently,
// then deleting either one needs to delete the the associations but not the other
// when navigating forward, this is relatively natural, just delete.
// when deleting the child in the backward association, the child map needs to be made aware of the
// existence of the parent. This is currently managed by the existence of the ForeignKey instance in the
// child map. This object should know how to delete the association.
// TODO: Not so sure the property name is important here
// TODO: Decouple this
// TODO: If the strategy is an AssociativeTable, CascadeSaves must be true
// TODO: This is a bit incongruent with the other uses of sql being hidden in the
// command adapter, but, simplest thing, simplest thing!
// TODO: IT WOULD BE NICE TO BE ABLE TO LEVERAGE THE
// IProperty TO ADD PARAMETERS TO THE QUERY
// BUT I DON'T HAVE A COMMAND RIGHT NOW
// TODO: this is a hack
// TODO: this down cast needs to go.
// TODO: Here, we don't want to read just yet. We want to let the foreign key read this part
// because it could be that we have a composite foreign key
// TODO: this could come back to haunt us when we start adding recursive references (e.g. tree nodes)
// TODO: Implement more than one level of inheritance
// The default, do nothing version of inheritance is to
// map each class to it's own table. In this case, we should *not*
// configure the superclass, because
// TODO: Need to check the class's persistent attr to see whether there should be a default mapping
// in the abscense of a property's persistent attr.
// Need to create a metadata navigation utility. This code is going to be very ugly otherwise.
// TODO: Need to get the semantics right for this. Add more attribute types for now
// The intermap dependencies (i.e. associations) are going to make it necessary to either
// sort the maps by dependency and configure them in least-to-most dependent order
// or be able to recursively kickoff a Configure(Type t) for each Association that is guarded to ensure
// that types are processed once and only once.
// TODO: Colocate the attributes with the configuration code rather than the metadata mapping code,
// add a polymorphic method to the PersistentAttribute, and push the code below into the
// polymorphic method
// TODO: Map Configurator currently assumes the naming strategy adopted in
// Imp.Persistence.Sql.Generation but the coupling is loose
// TODO: Need to be able to specify cascade semantics. Currently, everything defaults to true.
// TODO: Currently, we assume that the fk a) exists in the child table and b) uses exactly the same naming convention
// This strategy mirrors the object model in the database
// which is to say that for each class, abstract or not,
// it expects a table. One of the things I am struggling with
// is that, at runtime, we don't really [need to] care about the fact that
// the object is spread across two different tables, except possibly
// in the case of dynamic queries. Even that should be ignorable by
// having a base FindAll query to jump start the dynamic query.
// But we do need it at sql-gen time, and we do need it at configuration
// time, especially if we aren't using attributes.
// TODO: Remove the SQL2K-ism
// TODO: I believe that this is a sql2k-ism
// [ [ [ server. ] [ database ] . ] [ owner_name ] . ] object_name
// TODO: This "@" sql2k-ism needs to be farmed out to the Provider
// not supported -- map.Properties.Add(new Property("new Property("CharProp = 'y';
//TODO: need to add lengths to types, deal with dbtypes properly
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
// TODO: THIS ONE IS GOING TO FAIL BECAUSE OF THE NEED FOR [Order] in the select query
// BUT I NEEDED TO REMOVE IT FOR THE INFORMATION SCHEMA BECAUSE IT NEEDS AN Identifier
//TODO: use property name instead of column name
//TODO: shouldn't have to quote strings
//TODO: should convert dynamic sql values to named parameters that are set
//TODO: abstract the dialect from the ansi sql model from the generic expression model
// not supported -- primitive.CharProp = 'y';
primitive.DecimalProp = 0; //Decimal.MaxValue;
// TODO: Move this adjustment into a datetime IProperty implementation so that the framework
// always deals consistently with datetimes. Of course, it is specific to the database, i.e. sql2k,
// so there needs to be some coordination between the provider and the properrty.
ImpWare\Default.aspx(2):<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
ImpWare\Default.aspx(10): <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
/// <summary>
/// Summary description for _Default.
/// </summary>
// Put user code to initialize the page here
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
/// <summary>
/// Summary description for Global.
/// </summary>
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
/// <summary>
/// Summary description for Login.
/// </summary>
// Put user code to initialize the page here
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
/// <summary>
/// Summary description for SecurityDbConfigurator.
/// </summary>
// TODO: need to roll the strategy and the creation of the service providers into one
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Runtime Version: 1.1.4322.12
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
//------------------------------------------------------------------------------
// TODO: Consolidate QualifiedName and Identifier
// TODO: Design note: We may very well have legitimate columns in the database that
// we do not want to load into the application, nor do we want to make the application
// aware of them. This is going to cause difficulties in the difference engine.
// We are primarily concerned with getting the object model right.
// If nullable fields exist in the database but not in the object model, things may be cool.
// If nullable fields exist in the object model, but not in the database, we may be
// able to gracefully degrade as well.
// Some other problems that I thought about: Basically, it may not make sense to try to diff with a
// single map. It probably has to be a whole Database instance.
// TODO: Decouple this into a real unit test, i.e. minimize dependencies on
// improving.domain.security
// TODO: Currently, the expression tree is visited by a
// TODO: Need to add the simple query generation interface
//TODO: Make Backward FindChildByParent composite key aware
// TODO: Need to generate foreign key constraints at the end of the script
// TODO: Need to generate drop foreign key constraints at the beginning of the script
// TODO: Need to be able to use associative tables in (1-* | *-*) relationships
// TODO: handle composite keys
// TODO: refactor into
// TODO: This is currently coupled to the command adapter by assumption only
// TODO: Move this to the IMap
// TODO: could change this to be if map has id, then use that,
// TODO: need to append, e.g. INFORMATION_SCHEMA and/or deal with aliased table names
// TODO: Remove sql2k-ism
// TODO: actually fill this object back up
// TODO: Load as it exists here is a bit restricting, because it limits the
// TODO: I would really rather see this IdentityStrategy kept at the
// TODO: I added a hack here to quote the default string value. This is something that really needs to be
// TODO: proper logging
// TODO: fix sql injection attack here.
// TODO: Eval performance of this versus filling a DataSet
// TODO: I have seriously considered using the metadata attributes as the embodiment of
// TODO: Add constructor logic here
// TODO: maybe this load strategy should only be used by
// TODO: Add primitive maps
// TODO: Decouple this
// TODO: This is a bit incongruent with the other uses of sql being hidden in the
// TODO: IT WOULD BE NICE TO BE ABLE TO LEVERAGE THE
// TODO: this is a hack
// TODO: this down cast needs to go.
// TODO: IS THIS RIGHT?? THIS FRAMEWORK IS GETTING DIZZYING
// TODO: Here, we don't want to read just yet. We want to let the foreign key read this part
// TODO: this could come back to haunt us when we start adding recursive references (e.g. tree nodes)
// TODO: Need to track the created maps internally
// TODO: Need to get the semantics right for this. Add more attribute types for now
// TODO: Map Configurator currently assumes the naming strategy adopted in
// TODO: Currently, we assume that the fk a) exists in the child table and b) uses exactly the same naming convention
// TODO: Remove the SQL2K-ism
// TODO: I believe that this is a sql2k-ism
//TODO: need to add lengths to types, deal with dbtypes properly
// TODO: THIS ONE IS GOING TO FAIL BECAUSE OF THE NEED FOR [Order] in the select query
//TODO: use property name instead of column name
//TODO: shouldn't have to quote strings
//TODO: should convert dynamic sql values to named parameters that are set
//TODO: abstract the dialect from the ansi sql model from the generic expression model
// TODO: need to roll the strategy and the creation of the service providers into one
Total found: 429 Matching files: 78 Total files searched: 268
Recent Comments