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(` █████ █████ █ ███ █████ ██ ██ ██ ██ ██████ ████ █████ █ ███ 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} `);
|
||||
|
||||
var now = () => {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "botserver",
|
||||
"version": "2.4.42",
|
||||
"version": "3.1.0",
|
||||
"type": "module",
|
||||
"description": "General Bot Community Edition open-core server.",
|
||||
"main": "./boot.mjs",
|
||||
|
|
|
@ -758,6 +758,7 @@ export class GBVMService extends GBService {
|
|||
public async parseField(line) {
|
||||
|
||||
let required = line.indexOf('*') !== -1;
|
||||
let unique = /\bunique\b/gi.test(line);
|
||||
line = line.replace('*', '');
|
||||
|
||||
const fieldRegExp = /^\s*(\w+)\s*(\w+)(?:\((.*)\))?/gim;
|
||||
|
@ -766,7 +767,7 @@ export class GBVMService extends GBService {
|
|||
const name = reg[1];
|
||||
const t = reg[2];
|
||||
|
||||
let definition = { allowNull: !required };
|
||||
let definition = { allowNull: !required, unique: unique };
|
||||
definition['type'] = t;
|
||||
|
||||
if (reg[3]) {
|
||||
|
|
Loading…
Add table
Reference in a new issue