Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
dantti committed Nov 12, 2024
1 parent 2ddf422 commit e8c4bde
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: MIT

cmake_minimum_required(VERSION 3.16)
project(libasql VERSION 0.94.0 LANGUAGES CXX)
project(libasql VERSION 0.95.0 LANGUAGES CXX)

include(GNUInstallDirs)
include(GenerateExportHeader)
Expand Down
26 changes: 13 additions & 13 deletions demos/async1/coroutines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,19 +352,19 @@ int main(int argc, char *argv[])
});
co_yield obj; // so that this promise is destroyed if this object is destroyed

result = co_await t->database().coExec(u8"SELECT now(), pg_sleep(1)", obj);
if (result.has_value()) {
qDebug() << "coro exec result has value" << result->toJsonObject();
} else {
qDebug() << "coro exec result error" << result.error();
}

result = co_await t->coCommit();
if (result.has_value()) {
qDebug() << "coro exec result has value" << result->toJsonObject();
} else {
qDebug() << "coro exec result error" << result.error();
}
auto fooresult = /*co_await*/ APool::exec(u8"SELECT now(), pg_sleep(1)" /*, obj*/);
// if (result.has_value()) {
// qDebug() << "coro exec result has value" << result->toJsonObject();
// } else {
// qDebug() << "coro exec result error" << result.error();
// }

// result = co_await t->coCommit();
// if (result.has_value()) {
// qDebug() << "coro exec result has value" << result->toJsonObject();
// } else {
// qDebug() << "coro exec result error" << result.error();
// }
};

callPoolBegin();
Expand Down
5 changes: 3 additions & 2 deletions src/amigrations.h
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
/*
* SPDX-FileCopyrightText: (C) 2020-2023 Daniel Nicoletti <[email protected]>
* SPDX-FileCopyrightText: (C) 2020-2024 Daniel Nicoletti <[email protected]>
* SPDX-License-Identifier: MIT
*/
#pragma once

#include <adatabase.h>
#include <asql_migrations_export.h>

#include <QObject>

namespace ASql {

class AMigrationsPrivate;
class ASQL_EXPORT AMigrations : public QObject
class ASQL_MIGRATIONS_EXPORT AMigrations : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(AMigrations)
Expand Down

0 comments on commit e8c4bde

Please sign in to comment.