Texis Client Functions

SYNOPSIS
Server Connection Management

SERVER *openserver(char *hostname,char *port)
SERVER *closeserver(SERVER *serverhandle)
int     serveruser(char *username);
int     servergroup(char *groupname);
int     serverpass(char *password);

Texis control parameters

int n_setdatabase(SERVER *se,char *database);
str n_getdatabase(SERVER *se);

SQL interface Version 2

TSQL   *n_opentsql(SERVER *se);
TSQL   *n_closetsql(TSQL *ts);
int     n_settsql(TSQL *ts,char *stmt);
int     n_exectsql(TSQL *ts,...);
int     n_gettsql(TSQL *ts,char *format,...);
int     n_dotsql(TSQL *ts,char *stmt,...);
int     n_resulttsql(TSQL *ts,int flag);

SQL interface

int     n_texis(SERVER *se,char *queryformat,...);
TX     *n_closetx(SERVER *se,TX *tx);
TX     *n_opentx(SERVER *se);
TX     *n_duptx(SERVER *se,TX *tx);
TX     *n_settx(SERVER *se,TX *tx,char *queryformat,...);
TX     *n_preptx(SERVER *se,TX *tx,char *queryformat,...);
TX     *n_exectx(SERVER *se,TX *tx);
int     n_runtx(SERVER *se,TX *tx);
FLDLST *n_gettx(SERVER *se,TX *tx);
FLDLST *freefldlst(FLDLST *fl);
int     n_settexisparam(SERVER *se,int ipar,void *buf,int *len,
                        int ctype,int sqltype)
int     n_paramtx(SERVER *se,TX *tx,int ipar,void *buf,int *len,
                        int ctype,int sqltype)
int	n_resetparamtx(SERVER *se, TX *tx);
int     n_flushtx(SERVER *se,TX *tx);
int     n_flushtx2(SERVER *se,TX *tx, int nrows, int max);
MMOFFS *n_offstx(SERVER *se,TX *tx,char *fieldname);

Hit registration

int n_regtexiscb(SERVER *se,void *usr,func cb);
    func cb(void *usr,TEXIS *tx,FLDLST *fl);

Hit information

SRCHLST *n_getsrchlst(SERVER *se,TEXIS *tx);
SRCHLST *n_freesrchlst(SERVER *se,SRCHLST *sl);
SRCHI   *n_srchinfo(SERVER *se,SRCH *sr,int i);
SRCHI   *n_freesrchi(SERVER *se,SRCHI *si);
XPMI    *n_xpminfo(SERVER *se,SRCH *sr,int i);
XPMI    *n_freexpmi(SERVER *se,XPMI *xi);
int	 n_getindexcount(SERVER *se);

Object manipulation

char *n_newindirect(SERVER *se, char *database, char *table,
                    char *filename);

File transfer

int n_rcopyto(SERVER *se,char *remotedest,char *localsrc);
int n_rcopyfrom(SERVER *se,char *localdest,char *remotesrc);


DESCRIPTION
The Texis API provides the client program with an easy to use interface to any Texis server without regard to machine type. This is the preferred interface and completely unrelated to the ODBC interface which is documented elsewhere.

The network Metamorph API is also contained within the Texis server and available to client programs. It is documented separately. Please see its documentation in Part VI.

The programmer is strongly encouraged to play with the example programs provided with the package before attempting their own implementation. It is also suggested that you experiment with txtoc as well, as it can generate an outline to start from.

Server Connection Management

These functions allow you to connect and disconnect from a server. The return value from openserver() is a SERVER *, and will be used as the first parameter in all subsequent calls to the Server.

SQL interface

This group of operations is for passing a user's query onto the server for processing and subsequently obtaining the results. There are two different versions of the SQL interface. Version 2 is a higher level interface, which provides the same functionality, but simplifies many operations by working directly with your variables. This is the preferred interface for most applications.

Hit registration

These functions tell the server which client function to "call back" when it has located information pertinent to the query.

Hit information

These functions allow you to obtain detailed information about any Metamorph queries that may have been used in the query.

Object manipulation

These functions allow you to manipulate indirect fields within a Texis database.

File transfer

These functions provide the ability to transfer entire files between the client and server.

Texis control parameters

This set of functions is for getting and changing the various operational parameters that define how a remote Texis performs.


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.