new(basic.gblib): Databases. #392 @othonlima.
This commit is contained in:
parent
1abb3d4cca
commit
c726947d2a
3 changed files with 4 additions and 3 deletions
2
boot.mjs
2
boot.mjs
|
@ -13,7 +13,7 @@ console.log(` █████ █████ ██ █ █████ █
|
||||||
console.log(`██ █ ███ █ █ ██ ██ ██ ██ ██ ██ █ ██ ██ █ █ `);
|
console.log(`██ █ ███ █ █ ██ ██ ██ ██ ██ ██ █ ██ ██ █ █ `);
|
||||||
console.log(`██ ███ ████ █ ██ █ ████ █████ ██████ ██ ████ █ █ █ ██ `);
|
console.log(`██ ███ ████ █ ██ █ ████ █████ ██████ ██ ████ █ █ █ ██ `);
|
||||||
console.log(`██ ██ █ █ ██ █ █ ██ ██ ██ ██ ██ ██ █ ██ ██ █ █ `);
|
console.log(`██ ██ █ █ ██ █ █ ██ ██ ██ ██ ██ ██ █ ██ ██ █ █ `);
|
||||||
console.log(` █████ █████ █ ███ █████ ██ ██ ██ ██ ██████ ████ █████ █ ███ 3.0`);
|
console.log(` █████ █████ █ ███ █████ ██ ██ ██ ██ ██████ ████ █████ █ ███ 3.1`);
|
||||||
process.stdout.write(` botserver@${pjson.version}, botlib@${pjson.dependencies.botlib}, botbuilder@${pjson.dependencies.botbuilder}, node@${process.version.replace('v', '')}, ${process.platform} ${process.arch} `);
|
process.stdout.write(` botserver@${pjson.version}, botlib@${pjson.dependencies.botlib}, botbuilder@${pjson.dependencies.botbuilder}, node@${process.version.replace('v', '')}, ${process.platform} ${process.arch} `);
|
||||||
|
|
||||||
var now = () => {
|
var now = () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "botserver",
|
"name": "botserver",
|
||||||
"version": "2.4.42",
|
"version": "3.1.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"description": "General Bot Community Edition open-core server.",
|
"description": "General Bot Community Edition open-core server.",
|
||||||
"main": "./boot.mjs",
|
"main": "./boot.mjs",
|
||||||
|
|
|
@ -758,6 +758,7 @@ export class GBVMService extends GBService {
|
||||||
public async parseField(line) {
|
public async parseField(line) {
|
||||||
|
|
||||||
let required = line.indexOf('*') !== -1;
|
let required = line.indexOf('*') !== -1;
|
||||||
|
let unique = /\bunique\b/gi.test(line);
|
||||||
line = line.replace('*', '');
|
line = line.replace('*', '');
|
||||||
|
|
||||||
const fieldRegExp = /^\s*(\w+)\s*(\w+)(?:\((.*)\))?/gim;
|
const fieldRegExp = /^\s*(\w+)\s*(\w+)(?:\((.*)\))?/gim;
|
||||||
|
@ -766,7 +767,7 @@ export class GBVMService extends GBService {
|
||||||
const name = reg[1];
|
const name = reg[1];
|
||||||
const t = reg[2];
|
const t = reg[2];
|
||||||
|
|
||||||
let definition = { allowNull: !required };
|
let definition = { allowNull: !required, unique: unique };
|
||||||
definition['type'] = t;
|
definition['type'] = t;
|
||||||
|
|
||||||
if (reg[3]) {
|
if (reg[3]) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue