pub struct GoPgxBackend { /* private fields */ }Implementations§
Source§impl GoPgxBackend
impl GoPgxBackend
pub fn new(engine: &str) -> Result<Self, ScytheError>
Trait Implementations§
Source§impl CodegenBackend for GoPgxBackend
impl CodegenBackend for GoPgxBackend
Source§fn manifest(&self) -> &BackendManifest
fn manifest(&self) -> &BackendManifest
The backend’s manifest (type mappings, naming conventions, etc).
Source§fn file_header(&self) -> String
fn file_header(&self) -> String
Generate a file-level header (imports, docstring, etc).
Returns an empty string by default; backends may override.
Source§fn generate_row_struct(
&self,
query_name: &str,
columns: &[ResolvedColumn],
) -> Result<String, ScytheError>
fn generate_row_struct( &self, query_name: &str, columns: &[ResolvedColumn], ) -> Result<String, ScytheError>
Generate a row struct for a query result.
Source§fn generate_model_struct(
&self,
table_name: &str,
columns: &[ResolvedColumn],
) -> Result<String, ScytheError>
fn generate_model_struct( &self, table_name: &str, columns: &[ResolvedColumn], ) -> Result<String, ScytheError>
Generate a model struct for a table.
Source§fn generate_query_fn(
&self,
analyzed: &AnalyzedQuery,
struct_name: &str,
columns: &[ResolvedColumn],
params: &[ResolvedParam],
) -> Result<String, ScytheError>
fn generate_query_fn( &self, analyzed: &AnalyzedQuery, struct_name: &str, columns: &[ResolvedColumn], params: &[ResolvedParam], ) -> Result<String, ScytheError>
Generate a query function.
Source§fn generate_enum_def(&self, enum_info: &EnumInfo) -> Result<String, ScytheError>
fn generate_enum_def(&self, enum_info: &EnumInfo) -> Result<String, ScytheError>
Generate an enum definition.
Source§fn generate_composite_def(
&self,
composite: &CompositeInfo,
) -> Result<String, ScytheError>
fn generate_composite_def( &self, composite: &CompositeInfo, ) -> Result<String, ScytheError>
Generate a composite type definition.
Generate a file-level footer (closing braces, etc).
Returns an empty string by default; backends may override.
Source§fn query_class_header(&self) -> String
fn query_class_header(&self) -> String
Generate a class header that wraps query functions only.
When non-empty, the assembly will emit all type definitions (enums,
row structs, model structs) first, then this class header, then all
query functions, then the file footer.
Returns an empty string by default (no class wrapper).
Source§fn generate_rbs_file(&self, _context: &RbsGenerationContext) -> Option<String>
fn generate_rbs_file(&self, _context: &RbsGenerationContext) -> Option<String>
Generate an RBS type signature file for Ruby backends.
Returns
None by default; Ruby backends override this.Source§fn apply_options(
&mut self,
_options: &HashMap<String, String>,
) -> Result<(), ScytheError>
fn apply_options( &mut self, _options: &HashMap<String, String>, ) -> Result<(), ScytheError>
Apply per-backend configuration options from [[sql.gen]].
Backends override this to handle options like
row_type = "pydantic".Source§fn supported_engines(&self) -> &[&str]
fn supported_engines(&self) -> &[&str]
Database engines this backend supports.
Defaults to PostgreSQL only. Multi-DB backends override this.
Auto Trait Implementations§
impl Freeze for GoPgxBackend
impl RefUnwindSafe for GoPgxBackend
impl Send for GoPgxBackend
impl Sync for GoPgxBackend
impl Unpin for GoPgxBackend
impl UnsafeUnpin for GoPgxBackend
impl UnwindSafe for GoPgxBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more