0.1.3 • Published 7 years ago

@sql-extra/createindex v0.1.3

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

@sql-extra/createindex

sql-extra

Generate SQL command for CREATE INDEX.

const createIndex = require('@sql-extra/createindex');
// createIndex(<name>, <table>, <expression>, [options])
// -> sql command

// options: {
//   method: null  // index method: btree
// }


createIndex('food_code_idx', 'food', `"code"`);
// CREATE INDEX IF NOT EXISTS "food_code_idx" ON "food" ("code");

createIndex('food_type_idx', 'food', `"type"`, {method: 'GIN'});
// CREATE INDEX IF NOT EXISTS "food_type_idx" ON "food" USING GIN ("type");
0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago