-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Local object cache for cached_httpfs extension
* To cache remote object, user need to explicilty use `duckdb.cache(path)` function. Caching will not be triggered on normal `SELECT` queries. * When file is currently being cached and if we run in parallel another query targeting same remote object - second query will fail because it will not be able to take read lock. * PG_DATADIR/duckdb_cache will be used as cache directory
- Loading branch information
Showing
18 changed files
with
471 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,19 @@ | ||
#pragma once | ||
|
||
#include "duckdb.hpp" | ||
|
||
#include <string> | ||
#include <vector> | ||
|
||
namespace pgduckdb { | ||
|
||
/* constants for duckdb.secrets */ | ||
#define Natts_duckdb_secret 6 | ||
#define Anum_duckdb_secret_type 1 | ||
#define Anum_duckdb_secret_id 2 | ||
#define Anum_duckdb_secret_secret 3 | ||
#define Anum_duckdb_secret_region 4 | ||
#define Anum_duckdb_secret_endpoint 5 | ||
#define Anum_duckdb_secret_r2_account_id 6 | ||
|
||
typedef struct DuckdbSecret { | ||
std::string type; | ||
std::string id; | ||
std::string secret; | ||
std::string region; | ||
std::string endpoint; | ||
std::string r2_account_id; | ||
} DuckdbSecret; | ||
|
||
extern std::vector<DuckdbSecret> ReadDuckdbSecrets(); | ||
|
||
/* constants for duckdb.extensions */ | ||
#define Natts_duckdb_extension 2 | ||
#define Anum_duckdb_extension_name 1 | ||
#define Anum_duckdb_extension_enable 2 | ||
void AddSecretsToDuckdbContext(duckdb::ClientContext &context); | ||
|
||
typedef struct DuckdbExension { | ||
typedef struct DuckdbExtension { | ||
std::string name; | ||
bool enabled; | ||
} DuckdbExension; | ||
} DuckdbExtension; | ||
|
||
extern std::vector<DuckdbExension> ReadDuckdbExtensions(); | ||
extern std::vector<DuckdbExtension> ReadDuckdbExtensions(); | ||
|
||
} // namespace pgduckdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.