profile
viewpoint
EnokMan manyuanrong ThoughtWorks Chengdu China https://www.manyuanrong.cn/ 前重庆优启科技系统架构师; 前重庆奇燎科技CTO; 现:ThoughtWorks

manyuanrong/deno_mongo 216

MongoDB driver for Deno

manyuanrong/deno_mysql 151

MySQL driver for Deno

manyuanrong/dso 75

Simple Orm library for Deno based on deno_mysql

manyuanrong/deno-plugin-prepare 36

A library for managing deno native plugin dependencies

deno-china/denocn-website 33

Deno中文社区前端

manyuanrong/deno-smtp 31

SMTP implements for deno

manyuanrong/deno-checksum 5

Sha1、MD5 algorithms for Deno

manyuanrong/deno-deamon 5

Make the Deno program run in the background

manyuanrong/bytes_formater 3

Formatting bytes(Uint8Array、Uint16Array、Uint32Array、ArrayBufferView..) output, is very useful when debugging IO functions

manyuanrong/deno_practice 2

DENO开发实践源码

created tagmanyuanrong/deno_mongo

tagv0.13.0

MongoDB driver for Deno

created time in 15 hours

release manyuanrong/deno_mongo

v0.13.0

released time in 15 hours

push eventmanyuanrong/deno_mongo

manyuanrong

commit sha 3da023f8ad83d4548e6fa32011c881854af99147

feat: add collection drop

view details

push time in 15 hours

push eventmanyuanrong/deno_mongo

manyuanrong

commit sha 0a67b07c9b9ac066d349b9feec235ee75fb71059

feat: add collection drop

view details

push time in 15 hours

MemberEvent

created tagmanyuanrong/sql-builder

tagv1.8.0

SQL query builder for Deno

created time in 5 days

release manyuanrong/sql-builder

v1.8.0

released time in 5 days

push eventmanyuanrong/sql-builder

NaRro

commit sha d61fadffc9b61e05600d48361486aff7fe3b736f

feat: add clone method to Query. (#12)

view details

push time in 5 days

PR merged manyuanrong/sql-builder

feat: add clone method to Query.

support use cases in which we need to create similar sql. eg: get data list and record count in same (where) condition.

const builder = new Query();
builder.table("goods");
if (texture) {
  builder.where(Where.like("texture", `%${texture}%`));
}
const countBuilder = builder.clone().select("count(*) as c");
builder.select("*").limit((page - 1) * pagesize, pagesize);
const sql = builder.build();
const countSql = countBuilder.build();
logger.info(sql); // SELECT * FROM `goods` WHERE `texture` LIKE "%silk%" LIMIT 0, 10
logger.info(countSql); // SELECT count(*) as c FROM `goods` WHERE `texture` LIKE "%silk%"
+27 -0

1 comment

2 changed files

narrowizard

pr closed time in 5 days

PullRequestReviewEvent

Pull request review commentmanyuanrong/sql-builder

feat: add clone method to Query.

 export class Query {     return this;   } +  clone() {+    const c = new Query();

Use more meaningful and clear variable names

narrowizard

comment created time in 5 days

push eventmanyuanrong/deno_mongo

Alberto Valero Gómez

commit sha 109ae4a144e495b07fa8ef1062f761834ffc4315

Examples documentation (#118)

view details

push time in 6 days

PR merged manyuanrong/deno_mongo

Examples documentation

I just wanted to check if you guys are ok with this kind documentation. If that's the case I will document all the functions. I am using it to teach at university.

+253 -1

3 comments

2 changed files

avalero

pr closed time in 6 days

startedsnail007/proxy_admin_free

started time in 7 days

pull request commentmanyuanrong/deno-plugin-prepare

Only invoke `Deno.mkdir()` if the cache file does not exist

Included in the v0.8.0 release

TooTallNate

comment created time in 7 days

created tagmanyuanrong/deno-plugin-prepare

tagv0.8.0

A library for managing deno native plugin dependencies

created time in 7 days

release manyuanrong/deno-plugin-prepare

v0.8.0

released time in 7 days

push eventmanyuanrong/deno-plugin-prepare

myr

commit sha de2cc426d75ac0f131f76a9f560c94239be8b057

[feat] support custom cache dir

view details

push time in 7 days

push eventmanyuanrong/deno-plugin-prepare

myr

commit sha 5a53073613dba0b806cda51711dbfb76ee24628f

[feat] support custom cache dir

view details

myr

commit sha d83399c12066675ab970c3aa3a89336586cf4575

[feat] support custom cache dir

view details

push time in 7 days

push eventmanyuanrong/deno-plugin-prepare

Nathan Rajlich

commit sha 75edefaa3bb56d9d3727a7b6c7980056604283fa

Only invoke `Deno.mkdir()` if the cache file needs to be downloaded (#29)

view details

push time in 7 days

PR merged manyuanrong/deno-plugin-prepare

Only invoke `Deno.mkdir()` if the cache file does not exist

This fixes using the prepare() function when the file system is read-only (i.e. within AWS Lambda environment).

+2 -2

3 comments

1 changed file

TooTallNate

pr closed time in 7 days

created tagmanyuanrong/deno-smtp

tagv0.6.0

SMTP implements for deno

created time in 7 days

release manyuanrong/deno-smtp

v0.6.0

released time in 7 days

issue closedmanyuanrong/deno-smtp

Cannot use authentification

Hello,

I got this error when trying to connect.

error: TS2345 [ERROR]: Argument of type
'{ hostname: string; port: number; username: string; password: string; }' 
is not assignable to parameter of type 'ConnectConfig'.

Object literal may only specify known properties, and 'username' does not exist in type 'ConnectConfig'.

I'm using this version:

import { SmtpClient } from "https://deno.land/x/smtp@master/mod.ts";

as I saw that some fixed where added. I think what we're missing is the export of the connect config with authentification.

closed time in 7 days

RomainCscnLF

issue closedmanyuanrong/deno-smtp

Coudn't understand how to use reading Readme file

Dear , author.

First of all, I want to thank you for last upgrading of your package.

Could I ask you to provide a sample example of how to use correctly your package with gmail service, because I ve got an error like: Socket Error 10061 Connection Refused.

Feel free to close this issue.

closed time in 7 days

omarhoro

issue closedmanyuanrong/deno-smtp

README example is not runnable

await client.connect({ host: "smtp.163.com", // ==> hostname: "smtp.163.com" port: 25, username: "username", password: "password", });

// ConnectConfig define export interface ConnectConfig { hostname: string; port?: number; username: string; password: string; }

closed time in 7 days

tufeiping

issue closedmanyuanrong/deno-smtp

README

Hello, first I would like to thanks you for this package for deno.

Works nicely, but I have noticed that part of the read me is not correct. Specifically, the part explaining use case with gmail. Firstly, there is a typo, in line: --hostname: "smtp.gamil.com",--. Secondly, interface ConnectConfig doesnt have a "tls" key (parameter).

Suggestions for the future: I noticed, when sending, I can only send email to only one person. Would be nice to implement possibility to send to multiple people by giving an array.

Again, thank you. Eventhough there is still a way to upgade, it is still a good work.

closed time in 7 days

straker741

issue closedmanyuanrong/deno-smtp

Can not connect to gmail account

Hello, I'm trying to connect my gmail account with gmail smtp but i get this error:

error: Uncaught ConnectionRefused: No connection could be made because the target machine actively refused it. (os error 10061)
    at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
    at Object.sendAsync ($deno$/ops/dispatch_json.ts:98:10)
    at async Object.connectTls ($deno$/tls.ts:20:15)
    at async SmtpClient.connectTLS (https://deno.land/x/smtp/smtp.ts:36:18)`
Here's the code I use (similar to docs).
import { SmtpClient } from "https://deno.land/x/smtp/mod.ts";

const client = new SmtpClient();

await client.connectTLS({
  host: "smtp.gmail.com",
  port: 465,
  username: "my gmail",
  password: "my password",
});

closed time in 7 days

shotikot

issue commentmanyuanrong/deno-smtp

Can not connect to gmail account

host: "smtp.gmail.com"

V

hostname: "smtp.gmail.com"

shotikot

comment created time in 7 days

push eventmanyuanrong/deno-smtp

BookShell527

commit sha a53d8bfdda4caa55c18502bdaccf1f23db4f4795

Update for Deno v1.4.0 (#33) Co-authored-by: EnokMan <416828041@qq.com>

view details

push time in 7 days

PR merged manyuanrong/deno-smtp

Update for Deno v1.4.0

Hello sir, I am using your Packages for my project. But your Packages throw Error when i run it. So i try to fix the error with adding Export type and Import type. I'm sorry if i miss something. Hope you like it

+10 -8

1 comment

2 changed files

BookShell527

pr closed time in 7 days

push eventBookShell527/deno-smtp

Steven Guerrero

commit sha 778087661c6da522fbf4280422e23dd4f6605151

Update for Deno v1.4.4 (#35)

view details

timonson

commit sha 217469c51c954488e5bc365aa515807267f85dac

Fix headers being injected into an email (#37)

view details

EnokMan

commit sha 22033d65f4550bfdc22bc8999e393ac7ca7fa0ae

Merge branch 'master' into master

view details

push time in 7 days

push eventmanyuanrong/deno-smtp

timonson

commit sha 217469c51c954488e5bc365aa515807267f85dac

Fix headers being injected into an email (#37)

view details

push time in 7 days

PR merged manyuanrong/deno-smtp

Fix headers being injected into an email

This PR fixes https://github.com/manyuanrong/deno-smtp/issues/36

+1 -1

0 comment

1 changed file

timonson

pr closed time in 7 days

issue closedmanyuanrong/deno-smtp

Extra Info being injected into an email over AWS SES

The same problem described in this stackoverflow question occurs using AWS SES.

I was able to fix it by adding "+ \r\n" to the header in smtp.ts. Will make a PR soon.

closed time in 7 days

timonson

push eventmanyuanrong/deno-plugin-prepare

Nathan Rajlich

commit sha b831868e7e00b7870e4ebb4ad79f375efa576e17

Fix `PerpareOptions` -> `PrepareOptions` typo (#28)

view details

push time in 7 days

pull request commentmanyuanrong/deno-plugin-prepare

Only invoke `Deno.mkdir()` if the cache file does not exist

It seems that there is no essential difference, are you sure this can solve the problem?

TooTallNate

comment created time in 7 days

push eventmanyuanrong/deno_mysql

lideming

commit sha 526a26d9377a216a31742f6cd9057d34c20999cb

Add UNIX Domain Socket support

view details

lideming

commit sha c3c3ddcac95444e393fd99a8eb134a1fbba37ed1

Fix packet writing It's similar to 9ff345b (Fix packet body reading)

view details

lideming

commit sha 812f270eeb0055d885c8783d896fe824e89c2a14

Also run tests with UNIX Domain Socket

view details

lideming

commit sha ee8b25ae87f4c70f20c61ae97d9b51929303f2d6

Refine connection logging address

view details

EnokMan

commit sha 00d4651316a66b7cb7d98625380c98098556a26b

Merge pull request #85 from lideming/pr-unix-socket

view details

push time in 8 days

issue closedmanyuanrong/deno_mysql

Support Socket Path

As the Node MySQL library, is possible to use the socket path to connect? If not, can this be added?

From node mysql:

socketPath: The path to a Unix domain socket to connect to. When used host and port are ignored.

closed time in 8 days

alfredosalzillo

push eventmanyuanrong/deno_mysql

lideming

commit sha f1b1346401eb7f25a0343f70f83d651cafe4ab92

Revert the squash merging commit of #81

view details

lideming

commit sha 1b028b2c09e0b229c232c3e4990f830769e8ce77

Ensure properties are initialized

view details

lideming

commit sha a1cd2afa62be614edec1894c4421eaee08b3fef1

Refactor connection pool, add idle timeout

view details

lideming

commit sha 71fd07abae1432ce954b8bd9cd52c7ea57de529c

Fix fmt

view details

lideming

commit sha 386dc4a8f4568f09bb9186adfe4cf7fa3ddbb8e7

Fix pool closing

view details

lideming

commit sha 95f73e0fdf2df0111be2e0f6a3eeeca981a0205f

Improve connection pool Avoid to call enterIdle/exitIdle() when the connection is consumed by a deferred pop

view details

lideming

commit sha 10087726e88d1da873d3d4f1d7e61e4afdbaa680

Workaround in test

view details

lideming

commit sha e291bcb5d80498de65d686653311fc5dc3cffff7

Add test for idle timeout

view details

lideming

commit sha 9adea8f6304017e43c13ad72a5f93cbad3dcc551

Refine docs

view details

lideming

commit sha 152888f385784d7768ffa14426bc8953a7c4d083

Remove incorrect implementation of read timeout When reading from a open TCP socket, reader.read() will always wait until there is data available. (AFAIK there is no non-blocking/non-awaiting reading in Deno.) If read() returned null, it means the connection was closed by the remote host or broken, so read() again won't work. For compatibility, it still throws ResponseTimeoutError.

view details

lideming

commit sha 7a6f253a809894af56fb6ab4a4aed6e54726c5dd

Implement read timeout and improve error handling

view details

lideming

commit sha 953e22de84378d6733676f4ece2743eb8227a399

Add test for read timeout

view details

lideming

commit sha b6ff2f1bd0cd1a7e15b34c2c8eb0bf599ca53aeb

Add state checking in Connection.close() `this.state = ConnectionState.CLOSING;` is removed because the close function is synchronized, it is impossible to read the CLOSING value from elsewhere.

view details

lideming

commit sha 81f36a2fdb415142f0986e09cf421349ea4c4126

Allow to disable read timeout in config

view details

lideming

commit sha d3a6a949c5886499a82b5f0c1a4ea2021f29d974

Test: add deno resources assert

view details

lideming

commit sha 91c6b873899530f52c30939f241bd8679dc2eee8

Refine error handling If we get error when processing response, the connection protocol state is unknown, so we should close it.

view details

lideming

commit sha fddeb430b98169a994c1ed56e99af517e79fd197

Add checks for packet type

view details

lideming

commit sha 9ff345b2fe6b7afd63ea39dd8808959b75b04eb2

Fix packet body reading From the document of `Reader.read()`: > If some data is available but not `p.byteLength` bytes, `read()` > conventionally resolves to what is available instead of waiting for > more. Although the packet body is usually very small, there are chances (especially when the body is large, network is bad, or connect though tunnel, etc.) that the original implementation may fail to read the full body and mess up the connection.

view details

lideming

commit sha 5defdf6975b28c058d246d6d91c6942324e39fd8

Add test for large query and response

view details

EnokMan

commit sha 099b1a634f5ad9613e591816b8ee5d01d3d9904a

Merge pull request #84 from lideming/fix-body-read

view details

push time in 10 days

PR merged manyuanrong/deno_mysql

Fix packet body reading

From the document of Reader.read():

If some data is available but not p.byteLength bytes, read() conventionally resolves to what is available instead of waiting for more.

Although the packet body is usually very small, there are chances (especially when the body is large, network is bad, or connect through tunnel, etc.) that the original implementation may fail to read the full body and mess up the connection.

Without the fix (bda4fb5), the test added in this PR (4accd18) will fail:

testWithClient(async function testLargeQueryAndResponse(client) {
  function buildLargeString(len: number) {
    let str = "";
    for (let i = 0; i < len; i++) {
      str += (i % 10);
    }
    return str;
  }
  const largeString = buildLargeString(512 * 1024);
  assertEquals(
    await client.query(`select "${largeString}" as str`),
    [{ str: largeString }],
  );
});

(See CI on my repo: https://github.com/lideming/deno_mysql/actions/runs/298220612)

The first commit reverted the squash merging commit of (#81) to make this PR be able to merge, followed by the commits in #81 (which reverted the first commit).

The last 5 commits are the actual changes by this PR.

Please don't squash these commits again...

+75 -38

0 comment

5 changed files

lideming

pr closed time in 10 days

push eventmanyuanrong/deno_mysql

U-ways

commit sha b4b82ec404348cddc3f12ce9980525e92dc08f02

Add import type for imports not used as a value (#77)

view details

push time in 10 days

PR merged manyuanrong/deno_mysql

Add import type for imports not used as a value

Add Deno 1.4 support (see #72)

+8 -10

2 comments

5 changed files

U-ways

pr closed time in 10 days

pull request commentmanyuanrong/deno_mysql

Add import type for imports not used as a value

Some conflicts in the src/connection.ts file need to be resolved. You need to do a rebase

U-ways

comment created time in 10 days

startedlukeed/klona

started time in 10 days

issue closedmanyuanrong/deno_mysql

Release new version

Hello,

Would it be possible to tag and release the master branch as v2.4.1?

I'd like to be able to use deno_mysql with the updated version of export { replaceParams } from "https://deno.land/x/sql_builder@v1.7.0/util.ts";.

Thanks,

Chris

closed time in 11 days

ccouzens

created tagmanyuanrong/deno_mysql

tagv2.5.0

MySQL driver for Deno

created time in 11 days

release manyuanrong/deno_mysql

v2.5.0

released time in 11 days

pull request commentmanyuanrong/deno_mysql

Add idle timeout, fix read timeout, and improve error handling

awesome!

lideming

comment created time in 11 days

push eventmanyuanrong/deno_mysql

lideming

commit sha 1d7fa70c6b415226a19ab43da909037146299a38

Add idle timeout, fix read timeout, and improve error handling (#81)

view details

push time in 11 days

PR merged manyuanrong/deno_mysql

Add idle timeout, fix read timeout, and improve error handling

Should fix #79, fix #55

+350 -99

2 comments

7 changed files

lideming

pr closed time in 11 days

issue closedmanyuanrong/deno_mysql

error : ConnectionReset: An existing connection was forcibly closed by the remote host

Using deno_mysql in conjunction with oak for developing CRUD api against MySql db. Application is able to initiate connection and serve multiple client.execute(getQuery) requests with no problem.

However, if no requests are undertaken within 10 minute window the next call to client.execute(getQuery) fails, an immediate 2nd call also falls and then on a 3rd call the connection is established and continues to work as normal.

The following error is caught :-

Error: An existing connection was forcibly closed by the remote host. (os error 10054) at SendPacket.send (https://deno.land/x/mysql/src/packets/packet.ts:30:13) at async Connection.execute (https://deno.land/x/mysql/src/connection.ts:161:5) at async https://deno.land/x/mysql/src/client.ts:101:14 at async Client.useConnection (https://deno.land/x/mysql/src/client.ts:111:22) at async Client.execute (https://deno.land/x/mysql/src/client.ts:100:12) at async getCodeLookups (file:///C:/Users/Ian%20Strange%20-%20T1/Documents/GitHub/deno-auth/controllers/codelookup_controller.ts:16:3) at async allowedMethods (https://deno.land/x/oak@v5.2.0/router.ts:484:7) at async Application.#handleRequest (https://deno.land/x/oak@v5.2.0/application.ts:218:9)

On the 3rd call the client provides INFO messages to show reestablishing of connection

INFO connecting 127.0.0.1:3306 INFO connected to 127.0.0.1

Have been experiencing this issue without realising the nature of the error for at least 2 weeks - and only today have looked further and discovered the connection issue.

I'm unsure if this an issue with deno_mysql or if its an issue with Deno.Conn.

Is it possible to config around this? Or does deno_mysql need to change to cope with this timeout event and re-establish connection without error.

Let me know if you need any further info.

closed time in 11 days

SquareMesh

issue closedmanyuanrong/deno_mysql

Error on querying after hours of idle

Error: Read packet timeout
    at Connection.nextPacket (connection.ts:101:17)
    at async Connection.execute (connection.ts:162:19)
    at async Connection.query (connection.ts:143:20)
    at async client.ts:90:14
    at async Client.useConnection (client.ts:111:22)
    at async Client.query (client.ts:89:12)
    at (my code...)

To reproduce:

  1. Create a client with connection pool
  2. Do a query
  3. Wait for more than 8 hours (the default mysql server idle timeout)
  4. Query again, get the error

The case is that mysql server disconnect the connection in the pool on idle timeout. Then we get the disconnected connection from the pool, read from it, and get the EOF.

I suggest to add client-side connection idle timeout, which should shorter than 8 hours by default.

closed time in 11 days

lideming

push eventmanyuanrong/deno-smtp

Steven Guerrero

commit sha 778087661c6da522fbf4280422e23dd4f6605151

Update for Deno v1.4.4 (#35)

view details

push time in 11 days

PR merged manyuanrong/deno-smtp

Update for Deno v1.4.4

Upgrade for Deno 1.4.4 (--isolatedModules update from TypeScript 4)

+13 -12

1 comment

5 changed files

Soremwar

pr closed time in 11 days

startedrender-rs/render.rs

started time in 11 days

starteddimforge/rapier

started time in 15 days

push eventmanyuanrong/setup-ossutil

dependabot[bot]

commit sha 78c460bf42884960ec9226de76c673c7a740f2d6

Bump @actions/core from 1.1.3 to 1.2.6 Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.1.3 to 1.2.6. - [Release notes](https://github.com/actions/toolkit/releases) - [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md) - [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core) Signed-off-by: dependabot[bot] <support@github.com>

view details

EnokMan

commit sha 5e2b73afbabf7e0a374c01ab1c2657e937ef3d06

Merge pull request #3 from manyuanrong/dependabot/npm_and_yarn/actions/core-1.2.6 Bump @actions/core from 1.1.3 to 1.2.6

view details

push time in 18 days

PR merged manyuanrong/setup-ossutil

Bump @actions/core from 1.1.3 to 1.2.6 dependencies

Bumps @actions/core from 1.1.3 to 1.2.6. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md">@actions/core's changelog</a>.</em></p> <blockquote> <h3>1.2.6</h3> <ul> <li><a href="https://github-redirect.dependabot.com/actions/toolkit/pull/571">Update <code>exportVariable</code> and <code>addPath</code> to use environment files</a></li> </ul> <h3>1.2.5</h3> <ul> <li><a href="https://github-redirect.dependabot.com/actions/toolkit/pull/548">Correctly bundle License File with package</a></li> </ul> <h3>1.2.4</h3> <ul> <li><a href="https://github-redirect.dependabot.com/actions/toolkit/pull/405">Be more lenient in accepting non-string command inputs</a></li> <li><a href="https://github-redirect.dependabot.com/actions/toolkit/pull/411">Add Echo commands</a></li> </ul> <h3>1.2.3</h3> <ul> <li><a href="https://github.com/actions/toolkit/blob/main/packages/core/README.md#logging">IsDebug logging</a></li> </ul> <h3>1.2.2</h3> <ul> <li><a href="https://github-redirect.dependabot.com/actions/toolkit/pull/302">Fix escaping for runner commands</a></li> </ul> <h3>1.2.1</h3> <ul> <li><a href="https://github-redirect.dependabot.com/actions/toolkit/pull/263">Remove trailing comma from commands</a></li> <li><a href="https://github-redirect.dependabot.com/actions/toolkit/pull/221">Add "types" to package.json</a></li> </ul> <h3>1.2.0</h3> <ul> <li>saveState and getState functions for wrapper tasks (on finally entry points that run post job)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/actions/toolkit/commits/HEAD/packages/core">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~thboop">thboop</a>, a new releaser for @actions/core since your current version.</p> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+4 -4

0 comment

2 changed files

dependabot[bot]

pr closed time in 18 days

PullRequestReviewEvent

push eventmanyuanrong/deno_mysql

Chris Couzens

commit sha 788734b273afaaa5a2794cd532980828c0d9cfde

Depend on newer replaceParams from sql_builder This should fix the backslash problem in parameters: https://github.com/manyuanrong/deno_mysql/issues/57

view details

Chris Couzens

commit sha 51ad8e4ad00660d7d09303f0a9eaa323f9ab8ea5

Correct spelling of fields

view details

Chris Couzens

commit sha 7ca2da5cfafe05c8ae602ad800b4439ea3144053

Eliminate ifs by using bit flag logic I think the new code is better, because it doesn't repeat the ServerCapabilities bitflag. Each of the ServerCapabilities flags have precisely one 1 bit in their binary representations. ``` if (packet.serverCapabilities & ServerCapabilities.CLIENT_LONG_FLAG) { clientParam |= ServerCapabilities.CLIENT_LONG_FLAG; } ``` The value of the if expression will either be `0` or `ServerCapabilities.CLIENT_LONG_FLAG`, depending on if `packet.serverCapabilities` has the same bit set. Instead we can binary or with the expression directly. If the expression is 0, then the binary or does nothing. If the expression is `ServerCapabilities.CLIENT_LONG_FLAG`, then the binary or does the same thing as before. The same idea applies for the other 2 ifs.

view details

EnokMan

commit sha 2c417e7b612f6b352e2233db8b6af9ce4b46fbdc

Merge pull request #76 from ccouzens/more_misc

view details

push time in 18 days

PR merged manyuanrong/deno_mysql

More misc

3 more small commits as spot things in the code.

1 commit fixes a spelling mistake.

1 commit goes to a newer version of replaceParams, to fix a problem with backslashes.

The final commit uses bit operations rather than ifs when setting up clientParam for clarity.

+11 -19

0 comment

3 changed files

ccouzens

pr closed time in 18 days

startedGeal/nom

started time in 21 days

startedlucacasonato/dext.ts

started time in 21 days

push eventmanyuanrong/deno_mysql

Chris Couzens

commit sha b0e76c91067bb6c4412a3d1d3e4ceebfef3b14a1

Fix typo spelling mistakes Clinet should be Client COLSING should be CLOSING

view details

Chris Couzens

commit sha 9e8b181fa4cbf3796141fb6b606a3d7354c2b174

Simplify test error handling with finally The try block would make sure `await client.close()` was called even if the code threw an exception. We can get the same behaviour by using a `finally` clause. The catch clause would rethrow exceptions. `finally` has the same behaviour.

view details

Chris Couzens

commit sha ff69b79f2e85d83d5e795d8cde24258baf217542

Use deno std dependencies without the /x/ in the URL This makes it consistent with other deno std imports like async/mod.ts.

view details

Chris Couzens

commit sha 568178cccb671bd6aa252a9f85fcf444251984f3

Use config directly in connection Connection used to have a reference to the client. But it only used that reference to get to the client's config. Simplify by having it take a refernce to the config instead.

view details

EnokMan

commit sha 16d6c2303bffdac67cd2c92c94cb493b0e07f8af

Merge pull request #75 from ccouzens/misc

view details

push time in 25 days

PR merged manyuanrong/deno_mysql

Misc

A few things I spotted this evening whilst working on the code.

I've put explanations in the 4 commits.

I fixed a couple spelling mistakes. I simplified a try/catch syntax. I standardised the deno std lib dependencies URL. I made the connection class more specific in what it gets from client.

+16 -18

0 comment

4 changed files

ccouzens

pr closed time in 25 days

created tagmanyuanrong/sql-builder

tagv1.7.0

SQL query builder for Deno

created time in 25 days

release manyuanrong/sql-builder

v1.7.0

released time in 25 days

push eventmanyuanrong/sql-builder

Chris Couzens

commit sha 5804d1fde9f5e313ca73dd637083b8d1f04ed7ba

replaceParams should escape \ characters (#11)

view details

push time in 25 days

PR merged manyuanrong/sql-builder

replaceParams should escape \ characters

When using replaceParams to insert a string into a SQL string, it should escape backslashes as a pair of backslashes.

replaceParams escapes " characters as ".

Before this change, if the input string was " then the output string would be \" which would mean the " character was no longer escaped.

https://dev.mysql.com/doc/refman/8.0/en/string-literals.html#character-escape-sequences

This commit includes a few small other changes to replaceParams. Where indexOf was used to determine if a string contained a pattern I've replaced it with includes. This is better for people like me who aren't primarily Javascript/Typescript programmers.

-        (val.toLowerCase().indexOf(" as ") > -1 ||
-          val.toLowerCase().indexOf(" AS ") > -1)

The 2nd condition was never true because if the string is forced lower case it will never contain some uppper case characters.

manyuanrong/deno_mysql#57

+5 -4

0 comment

2 changed files

ccouzens

pr closed time in 25 days

push eventmanyuanrong/sql-builder

Chris Couzens

commit sha ea75da42a260c900ebeffc4ad9ad1a0f6b2fb272

Fix import warning (#10)

view details

push time in 25 days

PR merged manyuanrong/sql-builder

Fix import warning

When running deno test I got the following warning:

Warning std versions prefixed with 'v' will be deprecated on October 1st 2020. Please change your import to https://deno.land/std@0.51.0/testing/asserts.ts (at https://deno.land/std@v0.51.0/testing/asserts.ts)

+1 -1

0 comment

1 changed file

ccouzens

pr closed time in 25 days

issue closedmanyuanrong/deno_mongo

Unexpected error when findOne does not find anything.

I am having an unexpected error with this code:

try {
      const usersCollection: Collection<UserSchema> = db.collection<UserSchema>(
        "UsersCollection",
      );
      const user = await usersCollection.findOne({ _id: { $oid: args.id } });
      console.log(user);
      if (user) {
        console.log(user);
        return {
          ...user,
          id: user._id.$oid,
        };
      }
      throw new GQLError("User not found");
    } catch (e) {
      throw new GQLError(e);
    }

When findOne finds a document in the collection everything goes all right, instead, if no document is found the app crashes with the following error:

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: FromHexError(OddLength)', /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/bson-0.14.1/src/bson.rs:575:71
api-evaluation_1  | note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Is this an error on my code or on Mongo.

closed time in 25 days

avalero

issue commentmanyuanrong/deno_mongo

Unexpected error when findOne does not find anything.

Close duplicate questions. Reserved #89

avalero

comment created time in 25 days

push eventmanyuanrong/deno_mysql

Chris Couzens

commit sha d33040ef3237af7e654b3775d47c2758a4fae0d4

Document running tests (#74)

view details

push time in 25 days

pull request commentmanyuanrong/deno_mysql

Document running tests

LGTM

ccouzens

comment created time in 25 days

push eventmanyuanrong/deno_mysql

Chris Couzens

commit sha 568fc5245ba72c3af65050838bc54649086fdc05

Enable Visual Studio code's deno extension (#73) add .vscode/settings.json

view details

push time in 25 days

PR merged manyuanrong/deno_mysql

Enable Visual Studio code's deno extension

It requires the .vscode/settings.json file to have deno.enable true.

It's easier if the file is committed, so new developers immediately have the plugin enabled.

+3 -1

0 comment

2 changed files

ccouzens

pr closed time in 25 days

startedMrXujiang/h5-Dooring

started time in a month

startedRicbet/panel-magic

started time in a month

startedtaowen/awesome-lowcode

started time in a month

startedalibaba/ChatUI

started time in a month

startedprisma/prisma

started time in a month

startedAPIs-guru/graphql-voyager

started time in a month

push eventmanyuanrong/deno-checksum

EnokMan

commit sha 299169b5f45ccbcc4323853a1dbcfbbf3923e6f3

Update README.md

view details

push time in a month

pull request commentmanyuanrong/deno_mongo

Update for Deno 1.4.0

@lucacasonato The version in the source code is v0.11.2, but the release tag is v0.12.0

lucacasonato

comment created time in a month

push eventmanyuanrong/deno-plugin-prepare

Luca Casonato

commit sha 87b9938e1cb644d4f4cf8f877d55b6231cbfbc91

chore: update test plugin (#27) * chore: update test plugin * update rust

view details

push time in a month

pull request commentmanyuanrong/deno_mongo

Update for Deno 1.4.0

@lucacasonato https://github.com/manyuanrong/deno-plugin-prepare/releases/tag/v0.7.5

lucacasonato

comment created time in a month

created tagmanyuanrong/deno-plugin-prepare

tagv0.7.5

A library for managing deno native plugin dependencies

created time in a month

release manyuanrong/deno-plugin-prepare

v0.7.5

released time in a month

push eventmanyuanrong/deno-plugin-prepare

Luca Casonato

commit sha 15723800689361f768a926a0974f556df7a8fa0a

Update std again (#26) chore: update to Deno 1.4.0

view details

push time in a month

startedminio/minio

started time in a month

created tagmanyuanrong/deno-plugin-prepare

tagv0.7.4

A library for managing deno native plugin dependencies

created time in a month

release manyuanrong/deno-plugin-prepare

v0.7.4

released time in a month

more