1
//////////////////////////////////////////////////////////////////////////
3
// pgScript - PostgreSQL Tools
4
// RCS-ID: $Id: pgsTimes.cpp 7758 2009-03-26 20:49:59Z dpage $
5
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
6
// This software is released under the BSD Licence
8
//////////////////////////////////////////////////////////////////////////
12
#include "pgscript/expressions/pgsTimes.h"
14
#include "pgscript/objects/pgsVariable.h"
16
pgsTimes::pgsTimes(const pgsExpression * left, const pgsExpression * right) :
17
pgsOperation(left, right)
27
pgsExpression * pgsTimes::clone() const
29
return pnew pgsTimes(*this);
32
pgsTimes::pgsTimes(const pgsTimes & that) :
38
pgsTimes & pgsTimes::operator =(const pgsTimes & that)
42
pgsOperation::operator=(that);
47
wxString pgsTimes::value() const
49
return wxString() << m_left->value() << wxT(" * ") << m_right->value();
52
pgsOperand pgsTimes::eval(pgsVarMap & vars) const
55
pgsOperand left(m_left->eval(vars));
56
pgsOperand right(m_right->eval(vars));
59
return (*left * *right);