Skip to content

Commit a24d524

Browse files
committed
fix: rename null type
1 parent 8c63fd1 commit a24d524

File tree

5 files changed

+13
-81
lines changed

5 files changed

+13
-81
lines changed

package/nitrogen/generated/shared/c++/HybridNativeQueryResultSpec.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
// Forward declaration of `ArrayBuffer` to properly resolve imports.
1717
namespace NitroModules { class ArrayBuffer; }
18-
// Forward declaration of `NativeSqliteNullValue` to properly resolve imports.
19-
namespace margelo::nitro::rnnitrosqlite { struct NativeSqliteNullValue; }
18+
// Forward declaration of `NativeSQLiteNullValue` to properly resolve imports.
19+
namespace margelo::nitro::rnnitrosqlite { struct NativeSQLiteNullValue; }
2020
// Forward declaration of `SQLiteQueryColumnMetadata` to properly resolve imports.
2121
namespace margelo::nitro::rnnitrosqlite { struct SQLiteQueryColumnMetadata; }
2222

@@ -26,7 +26,7 @@ namespace margelo::nitro::rnnitrosqlite { struct SQLiteQueryColumnMetadata; }
2626
#include <string>
2727
#include <variant>
2828
#include <NitroModules/ArrayBuffer.hpp>
29-
#include "NativeSqliteNullValue.hpp"
29+
#include "NativeSQLiteNullValue.hpp"
3030
#include "SQLiteQueryColumnMetadata.hpp"
3131

3232
namespace margelo::nitro::rnnitrosqlite {
@@ -58,7 +58,7 @@ namespace margelo::nitro::rnnitrosqlite {
5858
// Properties
5959
virtual double getRowsAffected() = 0;
6060
virtual std::optional<double> getInsertId() = 0;
61-
virtual std::vector<std::unordered_map<std::string, std::variant<std::string, double, bool, std::shared_ptr<ArrayBuffer>, NativeSqliteNullValue>>> getResults() = 0;
61+
virtual std::vector<std::unordered_map<std::string, std::variant<std::string, double, bool, std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue>>> getResults() = 0;
6262
virtual std::optional<std::unordered_map<std::string, SQLiteQueryColumnMetadata>> getMetadata() = 0;
6363

6464
public:

package/nitrogen/generated/shared/c++/HybridNitroSQLiteSpec.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
namespace margelo::nitro::rnnitrosqlite { class HybridNativeQueryResultSpec; }
1818
// Forward declaration of `ArrayBuffer` to properly resolve imports.
1919
namespace NitroModules { class ArrayBuffer; }
20-
// Forward declaration of `NativeSqliteNullValue` to properly resolve imports.
21-
namespace margelo::nitro::rnnitrosqlite { struct NativeSqliteNullValue; }
20+
// Forward declaration of `NativeSQLiteNullValue` to properly resolve imports.
21+
namespace margelo::nitro::rnnitrosqlite { struct NativeSQLiteNullValue; }
2222
// Forward declaration of `BatchQueryResult` to properly resolve imports.
2323
namespace margelo::nitro::rnnitrosqlite { struct BatchQueryResult; }
2424
// Forward declaration of `BatchQueryCommand` to properly resolve imports.
@@ -33,7 +33,7 @@ namespace margelo::nitro::rnnitrosqlite { struct FileLoadResult; }
3333
#include <vector>
3434
#include <variant>
3535
#include <NitroModules/ArrayBuffer.hpp>
36-
#include "NativeSqliteNullValue.hpp"
36+
#include "NativeSQLiteNullValue.hpp"
3737
#include <NitroModules/Promise.hpp>
3838
#include "BatchQueryResult.hpp"
3939
#include "BatchQueryCommand.hpp"
@@ -75,8 +75,8 @@ namespace margelo::nitro::rnnitrosqlite {
7575
virtual void drop(const std::string& dbName, const std::optional<std::string>& location) = 0;
7676
virtual void attach(const std::string& mainDbName, const std::string& dbNameToAttach, const std::string& alias, const std::optional<std::string>& location) = 0;
7777
virtual void detach(const std::string& mainDbName, const std::string& alias) = 0;
78-
virtual std::shared_ptr<margelo::nitro::rnnitrosqlite::HybridNativeQueryResultSpec> execute(const std::string& dbName, const std::string& query, const std::optional<std::vector<std::variant<std::string, double, bool, std::shared_ptr<ArrayBuffer>, NativeSqliteNullValue>>>& params) = 0;
79-
virtual std::shared_ptr<Promise<std::shared_ptr<margelo::nitro::rnnitrosqlite::HybridNativeQueryResultSpec>>> executeAsync(const std::string& dbName, const std::string& query, const std::optional<std::vector<std::variant<std::string, double, bool, std::shared_ptr<ArrayBuffer>, NativeSqliteNullValue>>>& params) = 0;
78+
virtual std::shared_ptr<margelo::nitro::rnnitrosqlite::HybridNativeQueryResultSpec> execute(const std::string& dbName, const std::string& query, const std::optional<std::vector<std::variant<std::string, double, bool, std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue>>>& params) = 0;
79+
virtual std::shared_ptr<Promise<std::shared_ptr<margelo::nitro::rnnitrosqlite::HybridNativeQueryResultSpec>>> executeAsync(const std::string& dbName, const std::string& query, const std::optional<std::vector<std::variant<std::string, double, bool, std::shared_ptr<ArrayBuffer>, NativeSQLiteNullValue>>>& params) = 0;
8080
virtual BatchQueryResult executeBatch(const std::string& dbName, const std::vector<BatchQueryCommand>& commands) = 0;
8181
virtual std::shared_ptr<Promise<BatchQueryResult>> executeBatchAsync(const std::string& dbName, const std::vector<BatchQueryCommand>& commands) = 0;
8282
virtual FileLoadResult loadFile(const std::string& dbName, const std::string& location) = 0;

package/nitrogen/generated/shared/c++/NativeSqliteNullValue.hpp

Lines changed: 0 additions & 68 deletions
This file was deleted.

package/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { HybridNitroSQLite } from './nitro'
33
import { open } from './operations/session'
44
import NitroSQLiteOnLoad from './specs/NativeNitroSQLiteOnLoad'
55
import { execute, executeAsync } from './operations/execute'
6-
import { NativeSqliteNullValue } from './types'
6+
import { NativeSQLiteNullValue } from './types'
77
export type * from './types'
88
export { typeORMDriver } from './typeORM'
99

10-
export const NITRO_SQLITE_NULL: NativeSqliteNullValue = { isNull: true }
10+
export const NITRO_SQLITE_NULL: NativeSQLiteNullValue = { isNull: true }
1111

1212
export const onInitialized = new Promise<void>((resolve) => {
1313
NitroSQLiteOnLoad.onReactApplicationContextReady(resolve)

package/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ export enum ColumnType {
2929
export type BaseSQLiteValue = boolean | number | string | ArrayBuffer
3030

3131
// Passing null/undefined in array types is not possible, so we us a special struct as a workaround.
32-
export type NativeSqliteNullValue = {
32+
export type NativeSQLiteNullValue = {
3333
isNull: true
3434
}
35-
export type NativeSQLiteValue = BaseSQLiteValue | NativeSqliteNullValue
35+
export type NativeSQLiteValue = BaseSQLiteValue | NativeSQLiteNullValue
3636
export type NativeSQLiteQueryParams = NativeSQLiteValue[]
3737

3838
/**

0 commit comments

Comments
 (0)