Exemplo n.º 1
0
 public SQLiteFromTable(SQLiteFromInternalTable itable, string asName,
                        SQLiteExpression onExpr, List <string> usingOpt)
 {
     _itable   = itable;
     AsName    = asName;
     _onExpr   = onExpr;
     _usingOpt = usingOpt;
 }
Exemplo n.º 2
0
        public virtual object Clone()
        {
            SQLiteObjectName t = null;

            if (_table != null)
            {
                t = (SQLiteObjectName)_table.Clone();
            }
            SQLiteFromInternalTable fit = null;

            if (_itable != null)
            {
                fit = (SQLiteFromInternalTable)_itable.Clone();
            }
            SQLiteFromIndexed fi = null;

            if (_indexed != null)
            {
                fi = (SQLiteFromIndexed)_indexed.Clone();
            }
            SQLiteExpression expr = null;

            if (_onExpr != null)
            {
                expr = (SQLiteExpression)_onExpr.Clone();
            }
            List <string> us = null;

            if (_usingOpt != null)
            {
                us = new List <string>();
                foreach (string str in _usingOpt)
                {
                    us.Add(str);
                }
            }

            SQLiteFromTable res = new SQLiteFromTable();

            res._asName   = _asName;
            res._indexed  = fi;
            res._itable   = fit;
            res._onExpr   = expr;
            res._table    = t;
            res._usingOpt = us;
            return(res);
        }
        public virtual object Clone()
        {
            SQLiteSelectStatement stmt = null;

            if (_select != null)
            {
                stmt = (SQLiteSelectStatement)_select.Clone();
            }
            SQLiteFromClause f = null;

            if (_from != null)
            {
                f = (SQLiteFromClause)_from.Clone();
            }
            SQLiteFromInternalTable res = new SQLiteFromInternalTable();

            res._from   = f;
            res._select = stmt;
            return(res);
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            SQLiteFromInternalTable dst = obj as SQLiteFromInternalTable;

            if (dst == null)
            {
                return(false);
            }

            if (!RefCompare.CompareMany(_select, dst._select, _from, dst._from))
            {
                return(false);
            }

            return(true);
        }
Exemplo n.º 5
0
 public SQLiteFromClause AddInternalTable(SQLiteFromInternalTable itable, string asName,
                                          SQLiteExpression onExpr, List <string> usingOpt)
 {
     _tables.Add(new SQLiteFromTable(itable, asName, onExpr, usingOpt));
     return(this);
 }