import { Client } from 'https://deno.land/x/mysql@1.2.3/mod.ts';
const config = {
timeout: 10000,
pool: 3,
debug: true,
hostname: '127.0.0.1',
username: 'admin001',
password: 'admin001'
};
let client = await new Client().connect(config);
await client.execute(`CREATE DATABASE mydemo;`);
await client.execute(`USE mydemo;`);
await client.execute(`
CREATE TABLE user_info (
id int(11) NOT NULL AUTO_INCREMENT,
name varchar(100) NOT NULL,
is_top tinyint(1) default 0,
created_at timestamp not null default current_timestamp,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
`);
await client.close();
console.log('success!')

@manyuanrong Thanks. I tried with
jsencrypt, however it cant supportoaeppadding. I have to find other ways.I do get two methods, one is bridge to rust’s
rsacrate, the other is a bundle of forge.I choose the later as it has none business of platform difference at all.
And now seems we have extra option thanks @invisal . I would try to integrate that lib when I get time.
@magichim It’s not a working code. I alos try it by uncommenting the code. SQL excution result will return in mess order.