Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/postgres/axum-social-with-tests/src/http/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub enum Error {
/// A SQLx call returned an error.
///
/// The exact error contents are not reported to the user in order to avoid leaking
/// information about databse internals.
/// information about database internals.
#[error("an internal database error occurred")]
Sqlx(#[from] sqlx::Error),

Expand Down
2 changes: 1 addition & 1 deletion examples/postgres/files/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl Display for PostWithAuthorQuery {
async fn main() -> anyhow::Result<()> {
let pool = PgPool::connect(&dotenvy::var("DATABASE_URL")?).await?;

// we can use a tranditional wrapper around the `query!()` macro using files
// we can use a traditional wrapper around the `query!()` macro using files
query_file!("queries/insert_seed_data.sql")
.execute(&pool)
.await?;
Expand Down
2 changes: 1 addition & 1 deletion sqlx-cli/tests/ignored-chars/sqlx.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[migrate]
# Ignore common whitespace characters (beware syntatically significant whitespace!)
# Ignore common whitespace characters (beware syntactically significant whitespace!)
# Space, tab, CR, LF, zero-width non-breaking space (U+FEFF)
#
# U+FEFF is added by some editors as a magic number at the beginning of a text file indicating it is UTF-8 encoded,
Expand Down
2 changes: 1 addition & 1 deletion sqlx-core/src/config/reference.toml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ migrations-dir = "foo/migrations"
# Note that the TOML format requires double-quoted strings to process escapes.
# ignored-chars = ["\r"]

# Ignore common whitespace characters (beware syntatically significant whitespace!)
# Ignore common whitespace characters (beware syntactically significant whitespace!)
# Space, tab, CR, LF, zero-width non-breaking space (U+FEFF)
#
# U+FEFF is added by some editors as a magic number at the beginning of a text file indicating it is UTF-8 encoded,
Expand Down
2 changes: 1 addition & 1 deletion sqlx-core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub enum Error {
source: BoxDynError,
},

/// Error occured while encoding a value.
/// Error occurred while encoding a value.
#[error("error occurred while encoding a value: {0}")]
Encode(#[source] BoxDynError),

Expand Down
4 changes: 2 additions & 2 deletions sqlx-mysql/src/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ CREATE TABLE IF NOT EXISTS {table_name} (
migration: &'e Migration,
) -> BoxFuture<'e, Result<Duration, MigrateError>> {
Box::pin(async move {
// Use a single transaction for the actual migration script and the essential bookeeping so we never
// Use a single transaction for the actual migration script and the essential bookkeeping so we never
// execute migrations twice. See https://github.com/launchbadge/sqlx/issues/1966.
// The `execution_time` however can only be measured for the whole transaction. This value _only_ exists for
// data lineage and debugging reasons, so it is not super important if it is lost. So we initialize it to -1
Expand Down Expand Up @@ -268,7 +268,7 @@ CREATE TABLE IF NOT EXISTS {table_name} (
migration: &'e Migration,
) -> BoxFuture<'e, Result<Duration, MigrateError>> {
Box::pin(async move {
// Use a single transaction for the actual migration script and the essential bookeeping so we never
// Use a single transaction for the actual migration script and the essential bookkeeping so we never
// execute migrations twice. See https://github.com/launchbadge/sqlx/issues/1966.
let mut tx = self.begin().await?;
let start = Instant::now();
Expand Down
2 changes: 1 addition & 1 deletion sqlx-mysql/src/protocol/statement/row.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl<'de> ProtocolDecode<'de, &'de [MySqlColumn]> for BinaryRow {
let header = buf.get_u8();
if header != 0 {
return Err(err_protocol!(
"exepcted 0x00 (ROW) but found 0x{:02x}",
"expected 0x00 (ROW) but found 0x{:02x}",
header
));
}
Expand Down
2 changes: 1 addition & 1 deletion sqlx-mysql/src/protocol/text/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bitflags! {
/// Field is an enumeration.
const ENUM = 256;

/// Field is an auto-incement field.
/// Field is an auto-increment field.
const AUTO_INCREMENT = 512;

/// Field is a timestamp.
Expand Down
4 changes: 2 additions & 2 deletions sqlx-postgres/src/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ impl AnyConnectionBackend for PgConnection {
) -> BoxFuture<'c, sqlx_core::Result<AnyStatement>> {
Box::pin(async move {
let statement = Executor::prepare_with(self, sql, &[]).await?;
let colunn_names = statement.metadata.column_names.clone();
AnyStatement::try_from_statement(statement, colunn_names)
let column_names = statement.metadata.column_names.clone();
AnyStatement::try_from_statement(statement, column_names)
})
}

Expand Down
2 changes: 1 addition & 1 deletion sqlx-postgres/src/message/sasl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ impl FrontendMessage for SaslInitialResponse<'_> {

let response_len = i32::try_from(self.response.len()).map_err(|_| {
err_protocol!(
"SASL Initial Response length too long for protcol: {}",
"SASL Initial Response length too long for protocol: {}",
self.response.len()
)
})?;
Expand Down
2 changes: 1 addition & 1 deletion sqlx-postgres/src/migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ CREATE TABLE IF NOT EXISTS {table_name} (
if migration.no_tx {
execute_migration(self, table_name, migration).await?;
} else {
// Use a single transaction for the actual migration script and the essential bookeeping so we never
// Use a single transaction for the actual migration script and the essential bookkeeping so we never
// execute migrations twice. See https://github.com/launchbadge/sqlx/issues/1966.
// The `execution_time` however can only be measured for the whole transaction. This value _only_ exists for
// data lineage and debugging reasons, so it is not super important if it is lost. So we initialize it to -1
Expand Down
4 changes: 2 additions & 2 deletions sqlx-postgres/src/options/pgpass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ fn find_next_field<'a>(line: &mut &'a str) -> Option<Cow<'a, str>> {
let mut escaped_string = None;
let mut last_added = 0;

let char_indicies = line.char_indices();
for (idx, c) in char_indicies {
let char_indices = line.char_indices();
for (idx, c) in char_indices {
if c == ':' && !escaping {
let (field, rest) = line.split_at(idx);
*line = &rest[1..];
Expand Down
2 changes: 1 addition & 1 deletion sqlx-postgres/src/types/geometry/polygon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const BYTE_WIDTH: usize = mem::size_of::<f64>();
/// Description: Polygon (similar to closed polygon)
/// Representation: `((x1,y1),...)`
///
/// Polygons are represented by lists of points (the vertexes of the polygon). Polygons are very similar to closed paths; the essential semantic difference is that a polygon is considered to include the area within it, while a path is not.
/// Polygons are represented by lists of points (the vertices of the polygon). Polygons are very similar to closed paths; the essential semantic difference is that a polygon is considered to include the area within it, while a path is not.
/// An important implementation difference between polygons and paths is that the stored representation of a polygon includes its smallest bounding box. This speeds up certain search operations, although computing the bounding box adds overhead while constructing new polygons.
/// Values of type polygon are specified using any of the following syntaxes:
///
Expand Down
4 changes: 2 additions & 2 deletions tests/postgres/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ async fn copy_can_work_with_failed_transactions() -> anyhow::Result<()> {

tx.rollback().await?;

// conn should be usable again, as we explictly rolled back the transaction
// conn should be usable again, as we explicitly rolled back the transaction
let got: i32 = sqlx::query_scalar("SELECT 1")
.fetch_one(conn.as_mut())
.await?;
Expand Down Expand Up @@ -445,7 +445,7 @@ async fn it_can_work_with_failed_transactions() -> anyhow::Result<()> {
.is_err());
tx.rollback().await?;

// conn should be usable again, as we explictly rolled back the transaction
// conn should be usable again, as we explicitly rolled back the transaction
let got: i32 = sqlx::query_scalar("SELECT 1")
.fetch_one(conn.as_mut())
.await?;
Expand Down
Loading