@@ -124,7 +124,7 @@ pub trait PostgresNoticeHandler {
124124 fn handle ( & mut self , notice : PostgresDbError ) ;
125125}
126126
127- /// A struct which handles notices by logging at the info level.
127+ /// A notice handler which logs at the ` info` level.
128128///
129129/// This is the default handler used by a `PostgresConnection`.
130130pub struct DefaultNoticeHandler ;
@@ -713,7 +713,7 @@ pub trait PostgresStatement {
713713 /// the parameters of the statement.
714714 fn try_update ( & self , params : & [ & ToSql ] ) -> Result < uint , PostgresDbError > ;
715715
716- /// A conveience function wrapping `try_update`.
716+ /// A convenience function wrapping `try_update`.
717717 ///
718718 /// Fails if there was an error executing the statement.
719719 fn update ( & self , params : & [ & ToSql ] ) -> uint ;
@@ -1069,12 +1069,21 @@ impl<'self> Iterator<PostgresRow<'self>> for PostgresResult<'self> {
10691069}
10701070
10711071/// A single result row of a query.
1072+ ///
1073+ /// A value can be accessed by the name or index of its column, though access
1074+ /// by index is more efficient.
1075+ ///
1076+ /// ```rust
1077+ /// let foo: i32 = row[0];
1078+ /// let bar: ~str = row["bar"];
1079+ /// ```
10721080pub struct PostgresRow < ' self > {
10731081 priv stmt : & ' self NormalPostgresStatement < ' self > ,
10741082 priv data : ~[ Option < ~[ u8 ] > ]
10751083}
10761084
10771085impl < ' self > Container for PostgresRow < ' self > {
1086+ #[ inline]
10781087 fn len ( & self ) -> uint {
10791088 self . data . len ( )
10801089 }
0 commit comments