         self.conn = conn
     }
 
+    /// query database with SQL statement
     public func query(_ statement: String) throws -> RopeResult? {
         return try execQuery(statement: statement)
     }
 
+    /// query database with SQL statement, use $1, $2, etc. for params in SQL
     public func query(statement: String, params: [Any]) throws -> RopeResult? {
         return try execQuery(statement: statement, params: params)
     }

    case emptyQuery
    case invalidQuery(message: String)
    case fatalError(message: String)
}

public final class Rope {

        try? close()
    }

    /// connect to database using RopeCredentials struct
    public static func connect(credentials: RopeCredentials) throws -> Rope {
        let rope = Rope()
        try rope.establishConnection(host: credentials.host,
                                     port: credentials.port,
                                     dbName: credentials.dbName,
                                     user: credentials.user,
                                     password: credentials.password)

        return rope
    }

    /// connect to database using credential connection arguments
    public static func connect(host: String = "localhost", port: Int = 5432, dbName: String,
                               user: String, password: String) throws -> Rope {
        let rope = Rope()
