denodb
denodb copied to clipboard
Denodb mysql just return empty array
Hi , Something's bothering me, mysql doesn't return any data , just empty array. But in my localhost the data was exist
Version
deno 1.3.0
v8 8.6.334
typescript 3.9.7
Source Code :
import {DataTypes, Database, Model} from 'https://deno.land/x/[email protected]/mod.ts';
const db: Database = new Database('mysql', {
host: "localhost",
username: 'root',
password: "",
database: 'denovel',
port: 3306
});
class User extends Model {
static table = "users";
static timestamps = true;
static fields = {
id: {
primaryKey: true,
autoIncrement: true
},
username: DataTypes.STRING,
password: DataTypes.STRING
};
eachFieldNameWithAnExclamationMark !: string;
username !: string;
password !: string;
} db.link([User]);
const data = await User.select("username").all();
console.log(data);
Result
INFO connecting localhost:3306
INFO connected to localhost
[]
I added this source code because there was problem with save method in denodb before.
eachFieldNameWithAnExclamationMark !: string;
username !: string;
password !: string;
This can relate https://github.com/manyuanrong/deno_mysql/issues/29
I tried your source code, and it still works for me
deno 1.3.0 v8 8.6.334 typescript 3.9.7
Versi server: 10.4.8-MariaDB - mariadb.org binary
I tried your source code, and it still works for me
deno 1.3.0 v8 8.6.334 typescript 3.9.7
Versi server: 10.4.8-MariaDB - mariadb.org binary
yeah i think i have problem with my MariaDB , like link i refer here https://github.com/eveningkid/denodb/issues/107#issuecomment-685389068
Hey,
Has this issue been solved on their end?
Are you still facing it in denodb?
Keep in touch
Hey,
Has this issue been solved on their end?
Are you still facing it in denodb?
Keep in touch
This hasn't been solved, maybe issue with my Maria DB