Skip to content

Commit fbf494c

Browse files
authored
Fix typos (#31)
Found via: - `codespell -S target -L crate,spected,childrens` - `typos --format brief`
1 parent 85e07ab commit fbf494c

28 files changed

Lines changed: 92 additions & 92 deletions

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Once it's filed:
8787

8888
### Suggesting Enhancements
8989

90-
If you want to suggest an enhacement or new feature for the project, please [open a new issue](/issues) describing what you desire to improve, and, potentially, how you plan to contribute to the project.
90+
If you want to suggest an enhancement or new feature for the project, please [open a new issue](/issues) describing what you desire to improve, and, potentially, how you plan to contribute to the project.
9191

9292
#### Before Submitting an Enhancement
9393

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ You can read it [by clicking this link](https://zerodaycode.github.io/canyon-boo
2929
a `PostgreSQL` database and an `SqlServer` one in the same project.
3030
- Is macro based. With a few annotations and a configuration file, you are ready to write your data access.
3131
- Allows **migrations**. `Canyon-SQL` comes with a *god-mode* that will manage every table on your database for you. You can modify in `Canyon` code your tables internally, altering columns, setting up constraints...
32-
Also, in the future, we have plans to allow you to manipulate the whole server, like creating databases, altering configurations... everything, but in a programatically approach with `Canyon`!
32+
Also, in the future, we have plans to allow you to manipulate the whole server, like creating databases, altering configurations... everything, but in a programmatically approach with `Canyon`!
3333

3434
## Supported databases
3535

@@ -81,7 +81,7 @@ Note the leading reference on the `find_by_pk(...)` parameter. This associated f
8181
### Building more complex queries
8282

8383
For exemplify the capabilities of `Canyon`, we will use `SelectQueryBuilder<T>`, which implements the `QueryBuilder<T>` trait
84-
for build a more complex whery, filteing data and joining tables.
84+
for build a more complex where, filteing data and joining tables.
8585

8686
```rust
8787
let mut select_with_joins = LeagueTournament::select_query();
@@ -101,12 +101,12 @@ let mut select_with_joins = LeagueTournament::select_query();
101101
```
102102

103103
> Note: For now, when you use joins, you will need to create a new model with the columns in both tables (in case that you desire the data in such columns), but just follows the habitual process with the CanyonMapper.
104-
It will try to retrieve the data for every field declared. If you don't declare a field that is in the open clause, in this case (*), that field wont be retrieved. No problem. But if you have fields that aren't mapp
104+
It will try to retrieve the data for every field declared. If you don't declare a field that is in the open clause, in this case (*), that field won't be retrieved. No problem. But if you have fields that aren't map
105105
able with some column in the database, the program will panic.
106106

107107
## More examples
108108

109-
If you want to see more examples, you can take a look into the `tests` folder, at the root of this repository. Every avaliable database operation is tested there, so you can use it to find the usage of the described operations in the documentation metioned above
109+
If you want to see more examples, you can take a look into the `tests` folder, at the root of this repository. Every available database operation is tested there, so you can use it to find the usage of the described operations in the documentation mentioned above
110110

111111
## Contributing to CANYON-SQL
112112

@@ -115,7 +115,7 @@ You can take a look to our [templated guide]((./CONTRIBUTING.md)).
115115

116116
But, to summarize:
117117

118-
- Take a look at the already opened issues, to see if already exists of it's someone already taking care about solving it. Even tho, you can enter to participate and explain your point of view, or even help to acomplish the task
118+
- Take a look at the already opened issues, to see if already exists of it's someone already taking care about solving it. Even tho, you can enter to participate and explain your point of view, or even help to accomplish the task
119119
- Make a fork of `Canyon-SQL`
120120
- If you opened an issue, create a branch from the base branch of the repo (that's the default), and point it to your fork
121121
- After complete your changes, open a `PR` to the default branch. Fill the template provided in the best way you're able to do it

canyon_connection/src/canyon_database_connector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl DatabaseConnection {
6161

6262
tokio::spawn(async move {
6363
if let Err(e) = new_connection.await {
64-
eprintln!("An error occured while trying to connect to the PostgreSQL database: {e}");
64+
eprintln!("An error occurred while trying to connect to the PostgreSQL database: {e}");
6565
}
6666
});
6767

@@ -96,7 +96,7 @@ impl DatabaseConnection {
9696
// TcpStream to connect to the server.
9797
let tcp = TcpStream::connect(config.get_addr())
9898
.await
99-
.expect("Error instanciating the SqlServer TCP Stream");
99+
.expect("Error instantiating the SqlServer TCP Stream");
100100

101101
// We'll disable the Nagle algorithm. Buffering is handled
102102
// internally with a `Sink`.

canyon_connection/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ lazy_static! {
4040
/// in the configuration file.
4141
///
4242
/// This avoids Canyon to create a new connection to the database on every query, potentially avoiding bottlenecks
43-
/// derivated from the instanciation of that new conn every time.
43+
/// derivated from the instantiation of that new conn every time.
4444
///
4545
/// Note: We noticed with the integration tests that the [`tokio_postgres`] crate (PostgreSQL) is able to work in an async environment
4646
/// with a new connection per query without no problem, but the [`tiberius`] crate (MSSQL) sufferes a lot when it has continuous

canyon_crud/src/bounds.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ where
4545
/// and convert it to a tuple struct formed by the column name as an String,
4646
/// and the dynamic value of the [`QueryParameter<'_>`] trait object contained
4747
/// inside the variant requested,
48-
/// enabling a convertion of that value into something
48+
/// enabling a conversion of that value into something
4949
/// that can be part of an SQL query.
5050
///
5151
///
@@ -229,7 +229,7 @@ pub trait QueryParameter<'a>: std::fmt::Debug + Sync + Send {
229229
/// This implementation is necessary because of the generic amplitude
230230
/// of the arguments of the [`Transaction::query`], that should work with
231231
/// a collection of [`QueryParameter<'a>`], in order to allow a workflow
232-
/// that is not dependant of the specific type of the argument that holds
232+
/// that is not dependent of the specific type of the argument that holds
233233
/// the query parameters of the database connectors
234234
impl<'a> IntoSql<'a> for &'a dyn QueryParameter<'a> {
235235
fn into_sql(self) -> ColumnData<'a> {

canyon_crud/src/crud.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ mod sqlserver_query_launcher {
210210
where
211211
Z: AsRef<[&'a dyn QueryParameter<'a>]> + Sync + Send + 'a,
212212
{
213-
// Re-generate de insert statement to adecuate it to the SQL SERVER syntax to retrieve the PK value(s) after insert
213+
// Re-generate de insert statement to adequate it to the SQL SERVER syntax to retrieve the PK value(s) after insert
214214
if stmt.contains("RETURNING") {
215215
let c = stmt.clone();
216216
let temp = c

canyon_crud/src/query_elements/operators.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ pub enum Comp {
99
Eq,
1010
/// Operator "!=" not equals
1111
Neq,
12-
/// Operator ">" greather than value
12+
/// Operator ">" greater than value
1313
Gt,
14-
/// Operator ">=" greather or equals than value
14+
/// Operator ">=" greater or equals than value
1515
GtEq,
1616
/// Operator "<" less than value
1717
Lt,

canyon_crud/src/query_elements/query_builder.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ where
337337
/// * `col1` - The left side of the ON operator for the join
338338
/// * `col2` - The right side of the ON operator for the join
339339
///
340-
/// > Note: The order on the column paramenters is irrelevant
340+
/// > Note: The order on the column parameters is irrelevant
341341
pub fn left_join(&mut self, join_table: &str, col1: &str, col2: &str) -> &mut Self {
342342
self._inner
343343
.query
@@ -353,7 +353,7 @@ where
353353
/// * `col1` - The left side of the ON operator for the join
354354
/// * `col2` - The right side of the ON operator for the join
355355
///
356-
/// > Note: The order on the column paramenters is irrelevant
356+
/// > Note: The order on the column parameters is irrelevant
357357
pub fn inner_join(&mut self, join_table: &str, col1: &str, col2: &str) -> &mut Self {
358358
self._inner
359359
.query
@@ -369,7 +369,7 @@ where
369369
/// * `col1` - The left side of the ON operator for the join
370370
/// * `col2` - The right side of the ON operator for the join
371371
///
372-
/// > Note: The order on the column paramenters is irrelevant
372+
/// > Note: The order on the column parameters is irrelevant
373373
pub fn right_join(&mut self, join_table: &str, col1: &str, col2: &str) -> &mut Self {
374374
self._inner
375375
.query
@@ -385,7 +385,7 @@ where
385385
/// * `col1` - The left side of the ON operator for the join
386386
/// * `col2` - The right side of the ON operator for the join
387387
///
388-
/// > Note: The order on the column paramenters is irrelevant
388+
/// > Note: The order on the column parameters is irrelevant
389389
pub fn full_join(&mut self, join_table: &str, col1: &str, col2: &str) -> &mut Self {
390390
self._inner
391391
.query
@@ -511,7 +511,7 @@ where
511511
)
512512
}
513513

514-
let cap = columns.len() * 50; // Reserving an enought initial capacity per set clause
514+
let cap = columns.len() * 50; // Reserving an enough initial capacity per set clause
515515
let mut set_clause = String::with_capacity(cap);
516516
set_clause.push_str(" SET ");
517517

canyon_crud/src/result.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl<T> DatabaseResult<T> {
3333
}
3434

3535
/// Returns a [`Vec<T>`] filled with instances of the type T.
36-
/// Z param it's used to constrait the types that can call this method.
36+
/// Z param it's used to constraint the types that can call this method.
3737
///
3838
/// Also, provides a way to statically call `Z::deserialize_<db>` method,
3939
/// which it's the implementation used by the macros to automatically

canyon_macros/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ pub fn canyon_entity(
279279
// Fill the register with the data of the attached struct
280280
CANYON_REGISTER_ENTITIES
281281
.lock()
282-
.expect("Error adquiring Mutex guard on Canyon Entity macro")
282+
.expect("Error acquiring Mutex guard on Canyon Entity macro")
283283
.push(new_entity);
284284

285285
// Assemble everything
@@ -307,7 +307,7 @@ pub fn crud_operations(input: proc_macro::TokenStream) -> proc_macro::TokenStrea
307307
// Construct a representation of Rust code as a syntax tree
308308
// that we can manipulate
309309

310-
// Calls the helper struct to build the tokens that generates the final CRUD methos
310+
// Calls the helper struct to build the tokens that generates the final CRUD methods
311311
let ast: DeriveInput =
312312
syn::parse(input).expect("Error parsing `Canyon Entity for generate the CRUD methods");
313313
let macro_data = MacroTokens::new(&ast);
@@ -366,7 +366,7 @@ fn impl_crud_operations_trait_for_struct(
366366
let fk_method_signatures = _search_by_fk_tokens.iter().map(|(sign, _)| sign);
367367
let fk_method_implementations = _search_by_fk_tokens.iter().map(|(_, m_impl)| m_impl);
368368

369-
// The tokens for generating the methods that enable Canyon to retrive the child entities that are of T type
369+
// The tokens for generating the methods that enable Canyon to retrieve the child entities that are of T type
370370
// given a parent entity U: ForeignKeyable, as an associated function for the child type (T)
371371
let _search_by_revese_fk_tokens: Vec<(TokenStream, TokenStream)> =
372372
generate_find_by_reverse_foreign_key_tokens(macro_data, &table_schema_data);
@@ -426,7 +426,7 @@ fn impl_crud_operations_trait_for_struct(
426426

427427
/// Hidden trait for generate the foreign key operations available
428428
/// in Canyon without have to define them before hand in CrudOperations
429-
/// because it's just imposible with the actual system (where the methods
429+
/// because it's just impossible with the actual system (where the methods
430430
/// are generated dynamically based on some properties of the `foreign_key`
431431
/// annotation)
432432
#[canyon_sql::macros::async_trait]

0 commit comments

Comments
 (0)