“Insert Bulk” requests

The text of an “insert bulk” language request looks like this:

insert bulk tablename [with nodescribe]

where “with nodescribe” is optional.

In response, the SRV_LANGUAGE event handler should:

  1. Record the bulk type internally by calling srv_thread_props with cmd set to CS_SET, property set to SRV_T_BULKTYPE, and bufp pointing to a value of SRV_BULKLOAD.

  2. Continue parsing to extract the table name, which is an argument to the blk_init routine. The table name is in the form of “database.owner.tablename”, without slice information. If a slice is used for the bulk insert command, the colon and slice number must be removed from the table name.

  3. Allocate a bulk-descriptor structure, CS_BLKDESC, with a call to blk_alloc.

  4. Initialize the client half of the exchange with a call to blk_init.

  5. If “with nodescribe” is specified, it means that this data is part of a batch, and the table into which the bulk data will be loaded has already been described. The application need not call blk_srvinit a second time.

    If “with nodescribe” is not specified, initialize the server half of the exchange with a call to blk_srvinit.