/// <summary>
        /// Create a SchemaObject from a sql snippet, attempting to detect the type and name of the object
        /// </summary>
        /// <param name="sql">The sql to parse</param>
        /// <exception cref="SchemaParsingException">If the SQL cannot be parsed</exception>
        public SchemaObject(string sql)
        {
            _sql = sql;
            var name = ParseSql();

            _implementation = SchemaImpl.GetImplementation(_type, name, _sql);
        }
        /// <summary>
        /// Constructs a SchemaObject of the given type, name, and sql script
        /// </summary>
        /// <param name="type">The type of the SchemaObject</param>
        /// <param name="name">The name of the SchemaObject</param>
        /// <param name="sql">The SQL script for the SchemaObject</param>
        /// <remarks>The type and name must match the SQL script.</remarks>
        /// <exception cref="ArgumentNullException">If name or sql is null</exception>
        internal SchemaObject(SchemaObjectType type, string name, string sql)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            _type           = type;
            _sql            = sql;
            _implementation = SchemaImpl.GetImplementation(_type, name, _sql);
        }
        /// <summary>
        /// Drop an object from the database
        /// </summary>
        /// <param name="connection">The Sql connection to use</param>
        /// <param name="type">The type of the object</param>
        /// <param name="objectName">The name of the object</param>
        internal static void Drop(IDbConnection connection, SchemaObjectType type, string objectName)
        {
            var implementation = SchemaImpl.GetImplementation(type, objectName, null);

            implementation.Drop(connection);
        }