QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
Loading...
Searching...
No Matches
qgspostgresstringutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgspostgresstringutils.h
3 ---------------------
4 begin : July 2019
5 copyright : (C) 2019 by David Signer
6 email : david at opengis dot ch
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSPOSTGRESSTRINGUTILS_H
17#define QGSPOSTGRESSTRINGUTILS_H
18
19#include "qgis.h"
20#include "qgis_core.h"
21
22#include <qlist.h>
23
24#ifdef SIP_RUN
25// clang-format off
26% ModuleHeaderCode
28% End
29// clang-format on
30#endif
31
37 class CORE_EXPORT QgsPostgresStringUtils
38{
39 public:
45 static QVariantList parseArray( const QString &string );
46
52 static QString buildArray( const QVariantList &list );
53
54 private:
62 static QString getNextString( const QString &txt, int &i, const QString &sep );
63};
64
65#endif //QGSPOSTGRESSTRINGUTILS_H
Provides functions to handle postgres array-like formatted lists in strings.
static QString buildArray(const QVariantList &list)
Build a postgres array like formatted list in a string from a QVariantList.
static QVariantList parseArray(const QString &string)
Returns a QVariantList created out of a string containing an array in postgres array format {1,...