npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

phoenix-proxy

v0.1.10

Published

Phoenix hbase proxy server client

Downloads

4

Readme

node-phoenix-proxy

Create connection:

pp = require "node-phoenix-proxy"
phoenix = pp "phoenix://10.11.1.101:9898"

phoenix.on "error", (err) ->
	console.log err.message

Create table:

query = """
	CREATE TABLE phoenix_type_test(
		c1 INTEGER not null,
		c2 VARCHAR,
		c3 BINARY(10),
		c4 DOUBLE,
		c5 FLOAT,
		c6 BIGINT,
		c7 BOOLEAN,
		c8 TIMESTAMP,
		c10 DATE,
		c11 TINYINT,
		c12 SMALLINT,
		c13 DECIMAL,
		c14 TIME,
		c15 CHAR(5),
		c16 VARBINARY,
	CONSTRAINT PK PRIMARY KEY (c1))
"""

phoenix.update query, (err, result) ->
	console.log arguments

Insert new row:

query = """
	upsert into phoenix_type_test (c1, c2, c3, c4, c5, c6, c7, c8, c10, c11, c12, c13, c14, c15, c16) values
		(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
"""

params = [
	{integer: 1}
	{varchar: "foo"}
	{binary: new Buffer "bar"}
	{double: 1.1}
	{float: 1.1}
	{bigint: 1}
	{boolean: yes}
	{timestamp: new Date}
	{date: new Date}
	{tinyint: 1}
	{smallint: 1}
	{decimal: 1.1}
	{time: new Date}
	{char: "foo"}
	{varbinary: new Buffer "bar"}
]

phoenix.update query, params, (err, rows) ->
	console.log arguments

Select data:

phoenix.queryOne "select * from phoenix_type_test where c1 = ?", [integer: 1], () ->
	console.log arguments

Bulk request:

bulk = phoenix.bulk()
bulk.query "select * from phoenix_type_test where c1 = ?", [integer: 1]
bulk.query "select c1, c2 from phoenix_type_test where c2 = ?", [varchar: "foo"]
bulk.query "select c1, c7 from phoenix_type_test where c7 = ?", [boolean: yes]
bulk.execute (err, rows) ->
	console.log arguments

Known problems:

  • Char doesn't behave like binary does (binary adds x20 to the full length, char doesn't and behaves mores like varchar). So be careful with your where condition on those two types.