mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 11:45:53 +00:00
style: Use pre-commit tool and add simple config (#2029)
I started with really simple pre-commit hooks and will add more on top. Important files: - `.pre-commit-config.yaml` - the config for pre-commit - `.github/workflows/pre-commit.yml` - runs pre-commit hooks in branches and `develop` - `.github/workflows/pre-commit-autoupdate.yml` - autoupdates pre-commit hooks once in a month
This commit is contained in:
@@ -75,7 +75,7 @@ public:
|
||||
auto static kINSERT_TX_INDEX_EXAMPLE = [this]() {
|
||||
return handle_.prepare(fmt::format(
|
||||
R"(
|
||||
INSERT INTO {}
|
||||
INSERT INTO {}
|
||||
(hash, tx_type)
|
||||
VALUES (?, ?)
|
||||
)",
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
auto static kINSERT_LEDGER_EXAMPLE = [this]() {
|
||||
return handle_.prepare(fmt::format(
|
||||
R"(
|
||||
INSERT INTO {}
|
||||
INSERT INTO {}
|
||||
(sequence, account_hash)
|
||||
VALUES (?, ?)
|
||||
)",
|
||||
@@ -319,11 +319,11 @@ private:
|
||||
statements.emplace_back(fmt::format(
|
||||
R"(
|
||||
CREATE TABLE IF NOT EXISTS {}
|
||||
(
|
||||
(
|
||||
hash blob,
|
||||
tx_type text,
|
||||
PRIMARY KEY (hash)
|
||||
)
|
||||
PRIMARY KEY (hash)
|
||||
)
|
||||
)",
|
||||
data::cassandra::qualifiedTableName(settingsProvider_, "tx_index_example")
|
||||
));
|
||||
@@ -331,11 +331,11 @@ private:
|
||||
statements.emplace_back(fmt::format(
|
||||
R"(
|
||||
CREATE TABLE IF NOT EXISTS {}
|
||||
(
|
||||
(
|
||||
sequence bigint,
|
||||
account_hash blob,
|
||||
PRIMARY KEY (sequence)
|
||||
)
|
||||
PRIMARY KEY (sequence)
|
||||
)
|
||||
)",
|
||||
data::cassandra::qualifiedTableName(settingsProvider_, "ledger_example")
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user