1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 16:18:12 +00:00

AK+Everywhere: Rename String to DeprecatedString

We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
This commit is contained in:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -13,9 +13,9 @@
namespace SQL {
struct TupleElementDescriptor {
String schema { "" };
String table { "" };
String name { "" };
DeprecatedString schema { "" };
DeprecatedString table { "" };
DeprecatedString name { "" };
SQLType type { SQLType::Text };
Order order { Order::Ascending };
@ -29,7 +29,7 @@ struct TupleElementDescriptor {
}
void deserialize(Serializer& serializer)
{
name = serializer.deserialize<String>();
name = serializer.deserialize<DeprecatedString>();
type = (SQLType)serializer.deserialize<u8>();
order = (Order)serializer.deserialize<u8>();
}
@ -39,9 +39,9 @@ struct TupleElementDescriptor {
return (sizeof(u32) + name.length()) + 2 * sizeof(u8);
}
String to_string() const
DeprecatedString to_string() const
{
return String::formatted(" name: {} type: {} order: {}", name, SQLType_name(type), Order_name(order));
return DeprecatedString::formatted(" name: {} type: {} order: {}", name, SQLType_name(type), Order_name(order));
}
};
@ -91,13 +91,13 @@ public:
return len;
}
String to_string() const
DeprecatedString to_string() const
{
Vector<String> elements;
Vector<DeprecatedString> elements;
for (auto& element : *this) {
elements.append(element.to_string());
}
return String::formatted("[\n{}\n]", String::join('\n', elements));
return DeprecatedString::formatted("[\n{}\n]", DeprecatedString::join('\n', elements));
}
using Vector<TupleElementDescriptor>::operator==;