我有一个带有Postgres和sequelizein的工作模型NodeJS。假设模型是Person,具有name和age字段。现在我想动态检查模型类并获取有关它的属性的信息,例如它们的名称和最重要的类型。
使用Person.attributes
我得到一些信息:
name:
{ type:
{ options: [Object],
_binary: undefined,
_length: 255 },
Run Code Online (Sandbox Code Playgroud)
但是正如你所看到的,该type对象并没有告知name它是一个varchar或boolean。
有谁知道,如何获得这些信息 sequelize
我有以下C++代码
#include <set>
#include <string>
#include <iostream>
using namespace std;
class Pair {
public:
string lhs;
string rhs;
Pair();
Pair( string l, string r ) {
lhs=l;
rhs=r;
};
};
struct compare {
bool operator()(const Pair& a, const Pair& b) const{
if ( ( a.lhs == b.lhs && a.rhs == b.rhs ) || ( a.lhs == b.rhs && a.rhs == b.lhs ) ) {
cout << "MATCH" << endl;
}
return ( a.lhs == b.lhs && a.rhs == b.rhs ) …Run Code Online (Sandbox Code Playgroud) 目标是将最新的稳定GSL编译为Web 程序集并使其可作为Node.js使用模块使用。
受emscripten 手册这一部分的启发,我尝试了以下过程:
git clone git://git.savannah.gnu.org/gsl.git
cd gsl
git checkout tags/release-2-6
autoreconf -i
emconfigure ./configure
emmake make
Run Code Online (Sandbox Code Playgroud)
不幸的是,我得到了多个wasm-ld: error: duplicate symbol.
但是编译 GSL (make ) 工作得很好。
我在用emsdk version 2.0.16我在 Ubuntu 18.04 上
有谁知道如何解决这个问题?
非常感谢您的帮助。
c ×1
c++ ×1
emscripten ×1
gsl ×1
javascript ×1
linker ×1
node.js ×1
postgresql ×1
sequelize.js ×1
webassembly ×1