Skip to content

Use const_format for compile-time SQL formatting #1967

@coderabbitai

Description

@coderabbitai

Context

This issue was created as a follow-up to a suggestion in PR #1964.

Suggested by: @LinZhihao-723
Requested by: @hoophalab
PR: #1964
Comment: #1964 (comment)

Description

Currently, SQL queries in the codebase are formatted at runtime using the format! macro. We could leverage the const_format crate to perform SQL formatting at compile time instead, which could provide performance benefits by moving this work from runtime to compile time.

Scope

This suggestion applies to SQL query formatting throughout the codebase, particularly in the API server components where database queries are constructed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions