write_bind

Function write_bind 

Source
pub fn write_bind<P: ToParams>(
    buf: &mut Vec<u8>,
    portal: &str,
    statement_name: &str,
    params: &P,
    target_oids: &[Oid],
) -> Result<()>
Expand description

Write a Bind message to create a portal from a prepared statement.

  • portal: Portal name (empty string for unnamed portal)
  • statement_name: Prepared statement name
  • params: Parameter values (tuple of ToValue types)
  • target_oids: Target OIDs for encoding parameters

Uses per-parameter format codes based on preferred_format():

  • NUMERIC uses text format (0)
  • All other types use binary format (1)