#include <DataAnalysis/FileIO/csvutilities.h>
|
static bool | appendSqlResultSetIntoCsvFileWithMetaData (QSqlQuery &resultSet, const QString &fileName, const QChar delimiter, const bool writeHeaders, int skipLines=0) |
|
static bool | constructCreateTableCommand (const QString &tableName, const QStringList &columnNames, const QVector< QVariant::Type > &columnTypes, QString &command) |
|
static void | getColumnTypesFromQStrings (const QStringList &line, QVector< QVariant::Type > &types) |
|
static bool | getColumnTypesFromQStrings (QVector< QStringList > &lines, QVector< QVariant::Type > &types, bool ignoreFirstLine=true, bool checkAllRows=false) |
|
static bool | insertCsvDataIntoDatabase (QSqlDatabase db, const QString &tableName, QVector< QStringList > &lines, const QVector< QVariant::Type > &columnTypes) |
|
static bool | parseQStreamAsCSVForOneRow (QTextStream &source, QStringList &row, int &numberOfColumns, const QChar delimiter) |
|
static bool | parseQStringAsCSV (const QString &source, QVector< QStringList > &lines, const QChar delimiter, int skipLines=0) |
|
static bool | prependColumnNames (QVector< QStringList > &lines) |
|
static bool | writeDatabaseTableIntoCsvFile (QSqlQuery &resultSet, const QString &fileName, const QChar delimiter, const bool writeHeaders) |
|
◆ appendSqlResultSetIntoCsvFileWithMetaData()
bool appendSqlResultSetIntoCsvFileWithMetaData |
( |
QSqlQuery & |
resultSet, |
|
|
const QString & |
fileName, |
|
|
const QChar |
delimiter, |
|
|
const bool |
writeHeaders, |
|
|
int |
skipLines = 0 |
|
) |
| |
|
static |
◆ constructCreateTableCommand()
bool constructCreateTableCommand |
( |
const QString & |
tableName, |
|
|
const QStringList & |
columnNames, |
|
|
const QVector< QVariant::Type > & |
columnTypes, |
|
|
QString & |
command |
|
) |
| |
|
static |
◆ getColumnTypesFromQStrings() [1/2]
void getColumnTypesFromQStrings |
( |
const QStringList & |
line, |
|
|
QVector< QVariant::Type > & |
types |
|
) |
| |
|
static |
◆ getColumnTypesFromQStrings() [2/2]
bool getColumnTypesFromQStrings |
( |
QVector< QStringList > & |
lines, |
|
|
QVector< QVariant::Type > & |
types, |
|
|
bool |
ignoreFirstLine = true , |
|
|
bool |
checkAllRows = false |
|
) |
| |
|
static |
◆ insertCsvDataIntoDatabase()
bool insertCsvDataIntoDatabase |
( |
QSqlDatabase |
db, |
|
|
const QString & |
tableName, |
|
|
QVector< QStringList > & |
lines, |
|
|
const QVector< QVariant::Type > & |
columnTypes |
|
) |
| |
|
static |
◆ parseQStreamAsCSVForOneRow()
bool parseQStreamAsCSVForOneRow |
( |
QTextStream & |
source, |
|
|
QStringList & |
row, |
|
|
int & |
numberOfColumns, |
|
|
const QChar |
delimiter |
|
) |
| |
|
static |
◆ parseQStringAsCSV()
bool parseQStringAsCSV |
( |
const QString & |
source, |
|
|
QVector< QStringList > & |
lines, |
|
|
const QChar |
delimiter, |
|
|
int |
skipLines = 0 |
|
) |
| |
|
static |
◆ prependColumnNames()
bool prependColumnNames |
( |
QVector< QStringList > & |
lines | ) |
|
|
static |
◆ writeDatabaseTableIntoCsvFile()
bool writeDatabaseTableIntoCsvFile |
( |
QSqlQuery & |
resultSet, |
|
|
const QString & |
fileName, |
|
|
const QChar |
delimiter, |
|
|
const bool |
writeHeaders |
|
) |
| |
|
static |