Commit Graph

19 Commits

Author SHA1 Message Date
Kefu Chai
45c4f2039b cql3: add formatter for cql3::ut_name
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we define a formatter for cql3::ut_name, and remove
their operator<<().

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16890
2024-01-21 16:53:05 +02:00
Wojciech Mitros
169a821316 cql: maybe quote user type name in ut_name::to_string()
Currently, the ut_name::to_string() is used only in 2 cases:
the first one is in logs or as part of error messages, and the
second one is during parsing, temporarily storing the user
defined type name in the auth::resource for later preparation
with database and data_dictionary context.

This patch changes the string so that the 'name' part of the
ut_name (as opposed to the 'keyspace' part) is now quoted when
needed. This does not worsen the logging set of cases, but it
does help with parsing of the resulting string, when finishing
preparing the auth::resource.

After the modification, a more fitting name for the function
is "ut_name::to_cql_string()", so the function is renamed to that.
2023-03-23 01:41:58 +01:00
Avi Kivity
5937b1fa23 treewide: remove empty comments in top-of-files
After fcb8d040 ("treewide: use Software Package Data Exchange
(SPDX) license identifiers"), many dual-licensed files were
left with empty comments on top. Remove them to avoid visual
noise.

Closes #10562
2022-05-13 07:11:58 +02:00
Avi Kivity
fcb8d040e8 treewide: use Software Package Data Exchange (SPDX) license identifiers
Instead of lengthy blurbs, switch to single-line, machine-readable
standardized (https://spdx.dev) license identifiers. The Linux kernel
switched long ago, so there is strong precedent.

Three cases are handled: AGPL-only, Apache-only, and dual licensed.
For the latter case, I chose (AGPL-3.0-or-later and Apache-2.0),
reasoning that our changes are extensive enough to apply our license.

The changes we applied mechanically with a script, except to
licenses/README.md.

Closes #9937
2022-01-18 12:15:18 +01:00
Avi Kivity
a55b434a2b treewide: extent copyright statements to present day 2021-06-06 19:18:49 +03:00
Pavel Solodovnikov
ae213e1e25 cql3: various forward declaration cleanups
Signed-off-by: Pavel Solodovnikov <pa.solodovnikov@scylladb.com>
2021-05-20 00:18:00 +03:00
Duarte Nunes
fa2b0384d2 Replace std::experimental types with C++17 std version.
Replace stdx::optional and stdx::string_view with the C++ std
counterparts.

Some instances of boost::variant were also replaced with std::variant,
namely those that called seastar::visit.

Scylla now requires GCC 8 to compile.

Signed-off-by: Duarte Nunes <duarte@scylladb.com>
Message-Id: <20190108111141.5369-1-duarte@scylladb.com>
2019-01-08 13:16:36 +02:00
Avi Kivity
775b7e41f4 Update seastar submodule
* seastar d59fcef...b924495 (2):
  > build: Fix protobuf generation rules
  > Merge "Restructure files" from Jesse

Includes fixup patch from Jesse:

"
Update Seastar `#include`s to reflect restructure

All Seastar header files are now prefixed with "seastar" and the
configure script reflects the new locations of files.

Signed-off-by: Jesse Haber-Kucharsky <jhaberku@scylladb.com>
Message-Id: <5d22d964a7735696fb6bb7606ed88f35dde31413.1542731639.git.jhaberku@scylladb.com>
"
2018-11-21 00:01:44 +02:00
Pekka Enberg
38a54df863 Fix pre-ScyllaDB copyright statements
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".

Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com>
2016-04-08 08:12:47 +03:00
Pekka Enberg
d1bbd0271a cql3: Return const reference from ut_name::get_keyspace()
There's no need to copy the string but it does make it more difficult to
use get_keyspace() from other places that already return a const
reference.

Signed-off-by: Pekka Enberg <penberg@scylladb.com>
Message-Id: <1456148719-9473-1-git-send-email-penberg@scylladb.com>
2016-02-22 14:50:25 +01:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Pekka Enberg
78840a690f cql3: Move ut_name implementation to .cc file
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-24 10:21:11 +02:00
Pekka Enberg
c6da7e6844 cql3: Use std::nullopt constant
There's a std::nullopt constant for unset optionals. Use it.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-12 16:37:29 +03:00
Pekka Enberg
d50139351f cql3: Use pragma once everywhere
There's no benefit to using C include guards so switch to pragma once
everywhere for consistency.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-05-12 16:32:56 +03:00
Avi Kivity
7f781e314e cql3: add ut_name ostream operator 2015-04-26 19:25:39 +03:00
Avi Kivity
bc4d23883b cql3: simplify ut_name constructor
shared_ptr<> is already optional, so remove the outer optional<> wrapper.
2015-04-26 19:25:39 +03:00
Avi Kivity
8825a2bd74 cql3: add missing include to ut_name.hh 2015-04-26 18:45:59 +03:00
Pekka Enberg
0b0a751370 cql3: Clean up optional<> use in boolean return expressions
Suggested by Avi.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-01-18 10:27:58 +02:00
Pekka Enberg
9838901b38 cql3: Convert UTName to C++
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-01-12 15:40:08 +02:00