File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -8403,7 +8403,7 @@ ____________________________________________________________________________-->
8403
8403
</para>
8404
8404
____________________________________________________________________________-->
8405
8405
<para>
8406
- 要进入到单行模式,在一次成功的 <xref linkend="libpq-PQsetSingleRowMode "/>(或者其他兄弟函数)调用后立即调用 <xref linkend="libpq-PQsendQuery "/>。
8406
+ 要进入到单行模式,需要在成功调用 <xref linkend="libpq-PQsendQuery "/>(或兄弟函数)之后立即调用 <xref linkend="libpq-PQsetSingleRowMode "/>。
8407
8407
这种模式选择只对当前正在执行的查询有效。然后反复调用<xref linkend="libpq-PQgetResult"/>,直到它返回空,如<xref linkend="libpq-async"/>中所示。
8408
8408
如果该查询返回行,它们会作为单个的<structname>PGresult</structname>对象返回,它们看起来都像普通的查询结果,只不过其状态代码是<literal>PGRES_SINGLE_TUPLE</literal>而非<literal>PGRES_TUPLES_OK</literal>。
8409
8409
在最后一行之后或者紧接着该查询返回零行之后,一个状态为<literal>PGRES_TUPLES_OK</literal>的零行对象会被返回,这就是代表不会有更多行的信号(但是注意仍然有必要继续调用<xref linkend="libpq-PQgetResult"/>直到它返回空)。
You can’t perform that action at this time.
0 commit comments