Esempio n. 1
0
        public override void PerformBefore(DbObject node)
        {
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            if (!node.HasNext)
            {
                if (TailorUtil.IsSysdate(node.Identifier))
                {
                    ReplaceTerm(node, new FunctionCall(
                                    TailorUtil.GetCapitalized(TailorUtil.NOW)));
                }

                if (!m_inSelectItems && (m_selectItemAliases != null))
                {
                    string key = Identifier.Canonicalize(node.Identifier.ID);
                    if (m_selectItemAliases.ContainsKey(key))
                    {
                        AliasedItem orig = m_selectItemAliases[key];
                        ReplaceTerm(node, orig.Item.Clone());
                    }
                }
            }

            base.PerformBefore(node);
        }
Esempio n. 2
0
        public override void PerformBefore(DbObject node)
        {
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            if (!node.HasNext && TailorUtil.IsSysdate(node.Identifier))
            {
                ReplaceTerm(node, new FunctionCall(TailorUtil.GETDATE.ToUpperInvariant()));
            }

            base.PerformBefore(node);
        }
Esempio n. 3
0
        public override void PerformBefore(DbObject node)
        {
            if (node == null)
            {
                throw new ArgumentNullException("node");
            }

            if (!node.HasNext && TailorUtil.IsSysdate(node.Identifier))
            {
                ReplaceTerm(node, new DbObject(new Identifier(
                                                   TailorUtil.CURRENT_TIMESTAMP.ToUpperInvariant())));
            }

            base.PerformBefore(node);
        }