~ubuntu-branches/debian/sid/pgadmin3/sid

« back to all changes in this revision

Viewing changes to pgadmin/pgscript/expressions/pgsLowerEqual.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2009-07-30 12:27:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730122716-fddbh42on721bbs2
Tags: 1.10.0-1
* New upstream release.
* Adjusted watch file to match release candidates.
* Updated to Standards-Version 3.8.2:
  - Moved to Section: database.
  - Add DEB_BUILD_OPTIONS support for parallel building.
  - Move from findstring to filter suggestion for DEB_BUILD_OPTIONS parsing.
* pgagent got split into its own separate source package by upstream.
* Exclude Docs.vcproj from installation.
* Move doc-base.enus from pgadmin3 to pgadmin3-data package, the files are
  in there too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//////////////////////////////////////////////////////////////////////////
 
2
//
 
3
// pgScript - PostgreSQL Tools
 
4
// RCS-ID:      $Id: pgsLowerEqual.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
 
7
//
 
8
//////////////////////////////////////////////////////////////////////////
 
9
 
 
10
 
 
11
#include "pgAdmin3.h"
 
12
#include "pgscript/expressions/pgsLowerEqual.h"
 
13
#include "pgscript/objects/pgsRecord.h"
 
14
 
 
15
#include "pgscript/objects/pgsVariable.h"
 
16
 
 
17
pgsLowerEqual::pgsLowerEqual(const pgsExpression * left, const pgsExpression * right) :
 
18
        pgsOperation(left, right)
 
19
{
 
20
        
 
21
}
 
22
 
 
23
pgsLowerEqual::~pgsLowerEqual()
 
24
{
 
25
        
 
26
}
 
27
 
 
28
pgsExpression * pgsLowerEqual::clone() const
 
29
{
 
30
        return pnew pgsLowerEqual(*this);
 
31
}
 
32
 
 
33
pgsLowerEqual::pgsLowerEqual(const pgsLowerEqual & that) :
 
34
        pgsOperation(that)
 
35
{
 
36
 
 
37
}
 
38
 
 
39
pgsLowerEqual & pgsLowerEqual::operator =(const pgsLowerEqual & that)
 
40
{
 
41
        if (this != &that)
 
42
        {
 
43
                pgsOperation::operator=(that);
 
44
        }
 
45
        return (*this);
 
46
}
 
47
 
 
48
wxString pgsLowerEqual::value() const
 
49
{
 
50
        return wxString() << m_left->value() << wxT(" <= ") << m_right->value();
 
51
}
 
52
 
 
53
pgsOperand pgsLowerEqual::eval(pgsVarMap & vars) const
 
54
{
 
55
        // Evaluate operands
 
56
        pgsOperand left(m_left->eval(vars));
 
57
        pgsOperand right(m_right->eval(vars));
 
58
        
 
59
        // Return the result
 
60
        return (*left <= *right);
 
61
}