Skip to content

Commit

Permalink
fixtypo
Browse files Browse the repository at this point in the history
 - also updated comment
  • Loading branch information
silverqx committed Mar 26, 2022
1 parent 9f58737 commit 24296dd
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
5 changes: 3 additions & 2 deletions include/orm/schema/columndefinition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace Orm::SchemaNs
QString algorithm {};
};

/*! Foreign key constrains command. */
/*! Foreign key constraints command. */
class ForeignKeyCommand : public CommandDefinition
{
public:
Expand Down Expand Up @@ -184,7 +184,8 @@ namespace Orm::SchemaNs
own struct for every or very similar commands. They are now allocated
on the heap to save space because sizeof(ColumnDefinition) was 736 and
that is too much, eg. if schema would contain 100 columns it would take
73KB.
73KB. After a commands extraction sizeof(ColumnDefinition) have decreased
to 496 bytes (~40% decrease) 😁.
I have decided not to use polymorphic commands, I wanted to use
designated initializers with aggregates, the consequence of this is
usage of reinterpret_cast() :/, but it works great.
Expand Down
2 changes: 1 addition & 1 deletion include/orm/schema/schemaconstants_extern.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace Constants
SHAREDLIB_EXPORT extern const QString SpatialIndex;
SHAREDLIB_EXPORT extern const QString Foreign;

// Foreign constrains
// Foreign constraints
SHAREDLIB_EXPORT extern const QString Cascade;
SHAREDLIB_EXPORT extern const QString Restrict;
SHAREDLIB_EXPORT extern const QString SetNull;
Expand Down
2 changes: 1 addition & 1 deletion include/orm/schema/schemaconstants_inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ namespace Constants
inline const QString SpatialIndex = QStringLiteral("spatialIndex");
inline const QString Foreign = QStringLiteral("foreign");

// Foreign constrains
// Foreign constraints
inline const QString Cascade = QStringLiteral("cascade");
inline const QString Restrict = QStringLiteral("restrict");
inline const QString SetNull = QStringLiteral("set null");
Expand Down
4 changes: 2 additions & 2 deletions include/orm/tiny/concerns/hasrelationstore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ namespace Orm::Tiny::Concerns
Look at the Relation::m_parent for additional info. */
auto dummyModel = this->m_hasRelationStore.model().newInstance();

/* We want to run a relationship query without any constrains so that we will
/* We want to run a relationship query without any constraints so that we will
not have to remove these where clauses manually which gets really hacky
and error prone. We don't want constraints because we add eager ones. */
auto relationInstance =
Expand Down Expand Up @@ -636,7 +636,7 @@ namespace Orm::Tiny::Concerns
"How did this happen? Is a mystery 😎, a Related type has to be "
"the same as a RelatedFromMethod.");

// We want to run a relationship query without any constrains
// We want to run a relationship query without any constraints
auto relationInstance =
Relations::Relation<Derived, RelatedFromMethod>::noConstraints(
[this, &method]
Expand Down
1 change: 1 addition & 0 deletions include/orm/tiny/model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1323,3 +1323,4 @@ TINYORM_END_COMMON_NAMESPACE
// SEC fix LoadLibrary() before qsql plugin loads? https://www.qt.io/blog/security-advisory-qlockfile-qauthenticator-windows-platform-plugin silverqx
// CUR1 connection, control disable/enable logging at runtime silverqx
// CUR cmake, make TinyUtils_target in TinyTestCommon.cmake optional, not always needed to link to silverqx
// CUR docs, info about unsupported json column by qtsql drivers and link to schema.mdx Default Expressions silverqx
2 changes: 1 addition & 1 deletion src/orm/schema/schemaconstants_extern.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace Orm::SchemaNs::Constants
const QString SpatialIndex = QStringLiteral("spatialIndex");
const QString Foreign = QStringLiteral("foreign");

// Foreign constrains
// Foreign constraints
const QString Cascade = QStringLiteral("cascade");
const QString Restrict = QStringLiteral("restrict");
const QString SetNull = QStringLiteral("set null");
Expand Down

0 comments on commit 24296dd

Please sign in to comment.