Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
подготовка к публикации ver 1.0.0
  • Loading branch information
gayratvg committed Jan 8, 2022
1 parent f15c75d commit 672eace
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 311 deletions.
4 changes: 0 additions & 4 deletions AUTHORS

This file was deleted.

9 changes: 0 additions & 9 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Основная задача пакета
# Краткое описание
Данный пакет является дополнением к YDB-SDK (NodeJS SDK для Yandex Database).

В этом документе также приведена документация по YDB-SDK.
Expand Down
2 changes: 1 addition & 1 deletion examples/methods-examples/execute-query-quick.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { driver, initYDBdriver } from '../utils/ydb-functions';
import { Session, Ydb } from 'ydb-sdk';
import '@/helpers/augmentation';
import '../../src/helpers/ydb-sdk-augmentation';

(async function run() {
await initYDBdriver(); // если не удалось инициализация - то внутри идет process.exit
Expand Down
3 changes: 3 additions & 0 deletions examples/query-examples/like.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SELECT
string_column LIKE @@_ вася@@
FROM (values(@@_ вася@@)) as t(string_column);
289 changes: 14 additions & 275 deletions examples/query-examples/re2-syntax.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions examples/query-examples/re2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$value = "Вася ел та-та банан и сосал сушку"u;
$capture = Re2::Capture(@@(?i:вася)(банан)@@);

SELECT $capture($value) AS capture;
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"name": "ydb-table-defs",
"version": "1.0.4",
"version": "1.0.0",
"description": "simplify table definition, additional package to YDB-SDK",
"main": "build/index.js",
"files": [
"build/**"
],
"scripts": {
"ex1": "ts-node -r tsconfig-paths/register ./src/examples/basic-example-new-way/index.ts",
"example1": "ts-node -r tsconfig-paths/register ./src/examples/basic-example-new-way/index.ts",
"build:lib": "npm run clean && tsc",
"clean": "rimraf -rf build",
"release": "standard-version"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ declare module 'ydb-sdk' {
}
}

Ydb.Table.TransactionSettings.prototype.walk = (location: string) => `Likes to walk in the ${location}`;

Session.prototype.beginTransactionQuick = function (
txType: TransactionType,
allowInconsistentReads?: boolean | null,
Expand Down
15 changes: 0 additions & 15 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,20 +337,6 @@ export class TypedDataDefs extends TypedData {
return await withRetries(fillTable);
}

/*
Так не работает
static async createDBTable(session: Session, logger: Logger ) {
const YQLCreateTable = this.refMetaData.YQLCreateTable;
async function createTable() {
logger.info('Creating table...');
await session.executeQuery(YQLCreateTable);
}
await withRetries(createTable);
}*/

static async createDBTable(session: Session, logger: Logger) {
logger.info('Creating table... ' + this.refMetaData.tableName);

Expand Down Expand Up @@ -383,7 +369,6 @@ export const primitiveTypeIdToName: Record<string, string> = {};

function initPrimitiveTypeIdToName() {
for (const itm of Object.entries(Type.PrimitiveTypeId)) {
// @ts-ignore
primitiveTypeIdToName[itm[1]] = itm[0];
}
}
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"compilerOptions": {
"target": "ESNext",
"module": "commonjs",
"outDir": "build",
"moduleResolution": "node",
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"isolatedModules": false, /* "Ensure that each file can be safely transpiled without relying on other imports." */
"outDir": "build",
"pretty": true,
"newLine": "lf",
"stripInternal": true,
Expand Down

0 comments on commit 672eace

Please sign in to comment.