Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

looks OK to me. Pushed. Thanks.

Cheers
Radek

On Thu, 2012-02-09 at 18:44 +0100, Lionel Elie Mamane wrote:
With a PostgreSQL-SDBC database, Base query design does not allow the
user to use groupings and aggregate functions.

Change PostgreSQL-SDBC so that it declares to support Core SQL.

Please apply to libreoffice-3-5

See dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx

OSelectionBrowseBox::initialize

        if ( lcl_SupportsCoreSQLGrammar(xConnection) )
        {
            xub_StrLen nCount   = m_aFunctionStrings.GetTokenCount();
            for (xub_StrLen nIdx = 0; nIdx < nCount; nIdx++)
                m_pFunctionCell->InsertEntry(m_aFunctionStrings.GetToken(nIdx));
        }

where m_aFunctionStrings has been prepopulated by:

        IParseContext::InternationalKeyCode eFunctions[] = { 
IParseContext::KEY_AVG,IParseContext::KEY_COUNT,IParseContext::KEY_MAX
            ,IParseContext::KEY_MIN,IParseContext::KEY_SUM
            ,IParseContext::KEY_EVERY
            ,IParseContext::KEY_ANY
            ,IParseContext::KEY_SOME
            ,IParseContext::KEY_STDDEV_POP
            ,IParseContext::KEY_STDDEV_SAMP
            ,IParseContext::KEY_VAR_SAMP
            ,IParseContext::KEY_VAR_POP
            ,IParseContext::KEY_COLLECT
            ,IParseContext::KEY_FUSION
            ,IParseContext::KEY_INTERSECTION
        };

       for (size_t i = 0; i < SAL_N_ELEMENTS(eFunctions); ++i)
        {
            m_aFunctionStrings += String(RTL_CONSTASCII_USTRINGPARAM(";"));
            m_aFunctionStrings += 
String(ByteString(rContext.getIntlKeywordAscii(eFunctions[i])),RTL_TEXTENCODING_UTF8);

        }

and also

OSelectionBrowseBox::setFunctionCell:

    if ( xConnection.is() )
    {
        // Diese Funktionen stehen nur unter CORE zur Verf�gung
        }
        else
        {
            // nur COUNT(*) erlaubt
    }

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.