Click here to Skip to main content
15,881,812 members
Articles / Desktop Programming / Windows Forms

SQLite Compare Utility

Rate me:
Please Sign up or sign in to vote.
4.89/5 (68 votes)
21 Feb 2015LGPL35 min read 280.2K   37.1K   131  
Utility for comparing two SQLite database files for both structure and data
using System;
using System.Collections.Generic;
using System.Text;

namespace SQLiteParser
{
    public class SQLiteNameExpression : SQLiteExpression
    {
        private SQLiteNameExpression()
        {
        }

        public SQLiteNameExpression(SQLiteObjectName name)
        {
            _name = name;
        }

        public SQLiteObjectName Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public override bool IsConstant(bool allowNull)
        {
            return false;
        }

        public override bool Equals(object obj)
        {
            if (obj == null)
                return false;

            SQLiteNameExpression dst = obj as SQLiteNameExpression;
            if (dst == null)
                return false;

            if (!RefCompare.Compare(_name, dst._name))
                return false;

            return base.Equals(obj);
        }

        public override string ToString()
        {
            return _name.ToString();
        }

        public override object Clone()
        {            
            SQLiteObjectName name = null;
            if (_name != null)
                name = (SQLiteObjectName)_name.Clone();

            SQLiteNameExpression res = new SQLiteNameExpression();
            res._name = name;
            return res;
        }

        private SQLiteObjectName _name;
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Software Developer
Israel Israel
My name is Liron Levi and I'm developing software for fun & profit for 15 years already.

Comments and Discussions