Skip to content

Commit

Permalink
make kv use new doc client (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsinger-klotho authored Jan 25, 2023
1 parent 1d5afab commit 6f5dbd9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions pkg/lang/javascript/aws_runtime/_keyvalue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import _ = require('lodash')
import moment = require('moment')

import { AWSConfig } from './clients'
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb'

import DynamoDB = require('aws-sdk/clients/dynamodb')
const docClient = new DynamoDB.DocumentClient(AWSConfig)
const { DynamoDBClient } = require('@aws-sdk/client-dynamodb')

const docClient = new DynamoDBDocumentClient(new DynamoDBClient(AWSConfig))
let alldMaps: dMap[] = []

import { Entity } from 'electrodb'
Expand Down
5 changes: 3 additions & 2 deletions pkg/lang/javascript/aws_runtime/keyvalue.js.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ exports.dMap = void 0;
const _ = require("lodash");
const moment = require("moment");
const clients_1 = require("./clients");
const DynamoDB = require("aws-sdk/clients/dynamodb");
const docClient = new DynamoDB.DocumentClient(clients_1.AWSConfig);
const lib_dynamodb_1 = require("@aws-sdk/lib-dynamodb");
const { DynamoDBClient } = require('@aws-sdk/client-dynamodb');
const docClient = new lib_dynamodb_1.DynamoDBDocumentClient(new DynamoDBClient(clients_1.AWSConfig));
let alldMaps = [];
const electrodb_1 = require("electrodb");
const KVStore = new electrodb_1.Entity({
Expand Down

0 comments on commit 6f5dbd9

Please sign in to comment.