Skip to content

Add as_types to PostgresValues#967

Merged
tyt2y3 merged 1 commit intoSeaQL:masterfrom
Huliiiiii:postgres-type
Apr 8, 2026
Merged

Add as_types to PostgresValues#967
tyt2y3 merged 1 commit intoSeaQL:masterfrom
Huliiiiii:postgres-type

Conversation

@Huliiiiii
Copy link
Copy Markdown
Member

New Features

  • Add as_types to PostgresValues

@Huliiiiii Huliiiiii requested review from Expurple and tyt2y3 August 31, 2025 15:32
Comment thread sea-query-postgres/src/lib.rs Outdated
#[cfg(feature = "postgres-array")]
Value::Array(ty, _) => array_type_to_pg_type(ty),
#[cfg(feature = "postgres-vector")]
Value::Vector(_) => todo!(),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is the reason it is still WIP?
for non built-in types I think there is no way we can statically know the type id.
which mean we need to make this function fallible (return Result) sad

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Perhaps we could allow users to specify the pgvector return type through a parameter.

Comment thread sea-query-postgres/src/lib.rs Outdated
#[cfg(feature = "postgres-array")]
Value::Array(ty, _) => array_type_to_pg_type(ty),
#[cfg(feature = "postgres-vector")]
Value::Vector(_) => todo!(),
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to handle the mapping of pgvector?

Comment thread sea-query-postgres/src/lib.rs Outdated
#[cfg(feature = "postgres-array")]
Value::Array(ty, _) => array_type_to_pg_type(ty),
#[cfg(feature = "postgres-vector")]
Value::Vector(_) => todo!(),
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Perhaps we could allow users to specify the pgvector return type through a parameter.

@Huliiiiii
Copy link
Copy Markdown
Member Author

I totally don't know that reviews need to be submitted first

@tyt2y3 tyt2y3 marked this pull request as ready for review April 8, 2026 21:19
@tyt2y3 tyt2y3 merged commit 868c514 into SeaQL:master Apr 8, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

🎉 Released In 1.0.0-rc.33 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

postgres: create typed prepared statements

3 participants