Skip to content

Commit

Permalink
Migrate to github
Browse files Browse the repository at this point in the history
- Fix links within main README.md
- Remove bitbucket TOC macro in docs/README.md
- Add github compatiable TOC in docs/README.md
- Fix bindParamSync broken link
  • Loading branch information
abmusse committed Jan 24, 2019
1 parent 6a16b3b commit 606334a
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 26 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,20 @@ Then you can _require_ in your code, as shown below.
```

# API Reference
[DB2 for i Access APIs](https://bitbucket.org/litmis/nodejs-idb-connector/src/master/docs/README.md)
[DB2 for i Access APIs](https://github.com/IBM/nodejs-idb-connector/blob/master/docs/README.md)

# Change Log
View [`CHANGELOG.md`](https://bitbucket.org/litmis/nodejs-idb-connector/src/master/CHANGELOG.md) file.
View [`CHANGELOG.md`](https://github.com/IBM/nodejs-idb-connector/blob/master/CHANGELOG.md) file.

# Build
Note that building isn't necessary for end users and is more for developers looking to compile the native Node.js extensions (C code).

```sh
git clone git@bitbucket.org:litmis/nodejs-idb-connector.git
git clone git@github.com:IBM/nodejs-idb-connector.git
cd nodejs-idb-connector
npm install --build-from-source
```
Note: Gcc and python are required to compile the code.

# License
MIT. View [`LICENSE`](https://bitbucket.org/litmis/nodejs-idb-connector/src/master/LICENSE) file.
MIT. View [`LICENSE`](https://github.com/IBM/nodejs-idb-connector/blob/master/LICENSE) file.
90 changes: 68 additions & 22 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,56 @@
# DB2 for i Access APIs - idb-connector


[//]: # (TOC built in macro on BB makes table of contents)
[TOC]
- [DB2 for i Access APIs - idb-connector](#db2-for-i-access-apis---idb-connector)
- [Introduction](#introduction)
- [Install](#install)
- [Examples](#examples)
- [Async Exec](#async-exec)
- [Sync Exec](#sync-exec)
- [Async Prepare Bind Execute](#async-prepare-bind-execute)
- [Sync Prepare Bind Execute](#sync-prepare-bind-execute)
- [Async Fetch](#async-fetch)
- [Sync Fetch](#sync-fetch)
- [Async FetchAll](#async-fetchall)
- [Sync FetchAll](#sync-fetchall)
- [Class: dbconn](#class-dbconn)
- [Contructor: dbconn()](#contructor-dbconn)
- [dbconn.setConnAttr(attribute, value)](#dbconnsetconnattrattribute-value)
- [dbconn.getConnAttr(attribute)](#dbconngetconnattrattribute)
- [dbconn.conn(database)](#dbconnconndatabase)
- [dbconn.disconn()](#dbconndisconn)
- [dbconn.close()](#dbconnclose)
- [dbconn.debug(flag)](#dbconndebugflag)
- [dbconn.validStmt(sql)](#dbconnvalidstmtsql)
- [Class dbstmt](#class-dbstmt)
- [Constructor: dbstmt(connection)](#constructor-dbstmtconnection)
- [dbstmt.setStmtAttr(attribute, value)](#dbstmtsetstmtattrattribute-value)
- [dbstmt.getStmtAttr()](#dbstmtgetstmtattr)
- [dbstmt.exec(sql, callback)](#dbstmtexecsql-callback)
- [dbstmt.execSync(sql [, callback])](#dbstmtexecsyncsql--callback)
- [dbstmt.prepare(sql, callback)](#dbstmtpreparesql-callback)
- [dbstmt.prepareSync(sql [, callback])](#dbstmtpreparesyncsql--callback)
- [dbstmt.bindParam(params, callback)](#dbstmtbindparamparams-callback)
- [dbstmt.bindParamSync(params [, callback])](#dbstmtbindparamsyncparams--callback)
- [dbstmt.execute(callback)](#dbstmtexecutecallback)
- [dbstmt.executeSync([callback])](#dbstmtexecutesynccallback)
- [dbstmt.nextResult()](#dbstmtnextresult)
- [dbstmt.commit()](#dbstmtcommit)
- [dbstmt.rollback()](#dbstmtrollback)
- [dbstmt.closeCursor()](#dbstmtclosecursor)
- [dbstmt.close()](#dbstmtclose)
- [dbstmt.fetch([orient,] [offset,] callback)](#dbstmtfetchorient-offset-callback)
- [dbstmt.fetchSync()](#dbstmtfetchsync)
- [dbstmt.fetchAll(callback)](#dbstmtfetchallcallback)
- [dbstmt.fetchAllSync([callback])](#dbstmtfetchallsynccallback)
- [dbstmt.numFields()](#dbstmtnumfields)
- [dbstmt.numRows()](#dbstmtnumrows)
- [dbstmt.fieldType(index)](#dbstmtfieldtypeindex)
- [dbstmt.fieldWidth(index)](#dbstmtfieldwidthindex)
- [dbstmt.fieldNullable(index)](#dbstmtfieldnullableindex)
- [dbstmt.fieldName(index)](#dbstmtfieldnameindex)
- [dbstmt.fieldPrecise(index)](#dbstmtfieldpreciseindex)
- [dbstmt.fieldScale(index)](#dbstmtfieldscaleindex)
- [dbstmt.stmtError(callback)](#dbstmtstmterrorcallback)
___
# Introduction

Expand All @@ -18,14 +66,12 @@ ___

Build from source

- `git clone https://bitbucket.org/litmis/nodejs-idb-connector.git`
- `git clone https://github.com/IBM/nodejs-idb-connector.git`
- `cd nodejs-idb-connector`
- `npm install --build-from-source`
___
# Examples
[//]: # (On BB headers are prefixed by #markdown-header)
[//]: # (Also the title of the header are made lower case)
[//]: # (So to link to Async Exec header: #markdown-header-async-exec)

### Async Exec


Expand Down Expand Up @@ -553,7 +599,7 @@ setStmtAttr(attribute, value)
**Valid Scope:** After allocating the statement handler.
___

## dbstmt.getStmtAttr
## dbstmt.getStmtAttr()

**Description:**

Expand Down Expand Up @@ -602,7 +648,7 @@ exec(sql,callback)

**Valid Scope:** After calling the `conn` function.

**Example:** [Here](#markdown-header-async-exec)
**Example:** [Here](#async-exec)

___

Expand Down Expand Up @@ -648,7 +694,7 @@ execSync(sql, callback(resultSet, error))

**Valid Scope:** After calling the conn() function.

**Example:** [Here](#markdown-header-sync-exec)
**Example:** [Here](#sync-exec)

___

Expand Down Expand Up @@ -684,7 +730,7 @@ If the statement handler has been used with a SELECT statement,

- Before calling the execute() or bindParam() function.

**Example:** [Here](#markdown-header-async-prepare-bind-execute)
**Example:** [Here](#async-prepare-bind-execute)
___

## dbstmt.prepareSync(sql [, callback])
Expand Down Expand Up @@ -730,7 +776,7 @@ If the statement handler has been used with a SELECT statement

- Before calling the `executeSync` or `bindParamSync` function.

**Example:** [Here](#markdown-header-sync-prepare-bind-execute)
**Example:** [Here](#sync-prepare-bind-execute)

___

Expand Down Expand Up @@ -787,7 +833,7 @@ bindParam(params, callback)

**Valid Scope:** In the callback function of the `prepare` function.

**Example:** [Here](#markdown-header-async-prepare-bind-execute)
**Example:** [Here](#async-prepare-bind-execute)

___

Expand All @@ -803,7 +849,7 @@ bindParamSync(params)

**Parmeters:**

- **params**: as described in [bindParam](#dbstmt.bindParam())
- **params**: as described in [bindParam](#dbstmtbindparamparams-callback)

**Returns:**

Expand All @@ -815,14 +861,14 @@ bindParamSync(params, callback)

**Parameters**

- **params**: as described in [bindParam()](#dbstmt.bindParam())
- **params**: as described in [bindParam](#dbstmtbindparamparams-callback)


- **callback(error)**: `function` to process after `bindParamSync` is complete.
- **error**: `Error object` when `bindParamSync` is unsuccessful. Otherwise `error` is set to `null`.


**Example:** [Here](#markdown-header-sync-prepare-bind-execute)
**Example:** [Here](#sync-prepare-bind-execute)

**DB2 CLI API:** SQLBindParameter

Expand Down Expand Up @@ -856,7 +902,7 @@ execute(callback(outputParams, error))

**Valid Scope:** In the callback function of the `prepare` or `bindParam` function.

**Example:** [Here](#markdown-header-async-prepare-bind-execute)
**Example:** [Here](#async-prepare-bind-execute)

___

Expand Down Expand Up @@ -894,7 +940,7 @@ If the statement also returns a result set, user can issue the `fetch` function

**Valid Scope:** After calling the prepareSync() function.

**Example:** [Here](#markdown-header-sync-prepare-bind-execute)
**Example:** [Here](#sync-prepare-bind-execute)
___

## dbstmt.nextResult()
Expand Down Expand Up @@ -1059,7 +1105,7 @@ fetch(orient, offset, callback)

**Valid Scope:** When the result set is available.

**Example:** [Here](#markdown-header-async-fetch)
**Example:** [Here](#async-fetch)

___

Expand Down Expand Up @@ -1100,7 +1146,7 @@ fetchSync(int Orient, int Offset, function Callback(Row))

**Valid Scope:** When the result set is available.

**Example:** [Here](#markdown-header-sync-fetch)
**Example:** [Here](#sync-fetch)

## dbstmt.fetchAll(callback)

Expand All @@ -1124,7 +1170,7 @@ fetchAll(callback)

**Valid Scope:** When the result set is available.

**Example:** [Here](#markdown-header-async-fetchAll)
**Example:** [Here](#async-fetchAll)
___

## dbstmt.fetchAllSync([callback])
Expand Down Expand Up @@ -1154,7 +1200,7 @@ fetchAllSync(callback)

- **error**: `Error object` when `fetchAllSync` is unsuccessful. Otherwise `error` is set to `null`.

**Example:** [Here](#markdown-header-sync-fetchAll)
**Example:** [Here](#sync-fetchAll)


**DB2 CLI API:** SQLFetch
Expand Down

0 comments on commit 606334a

Please sign in to comment.