Updates
This commit is contained in:
parent
881128fcea
commit
6e334c2525
@ -1,4 +1,4 @@
|
||||
import { DSQL_DATASQUIREL_USER_DATABASES } from "@/package-shared/types/dsql";
|
||||
import { DSQL_DATASQUIREL_USER_DATABASES } from "../../types/dsql";
|
||||
type Params = {
|
||||
userId: number | string;
|
||||
database: DSQL_DATASQUIREL_USER_DATABASES;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DSQL_DatabaseSchemaType } from "@/package-shared/types";
|
||||
import { DSQL_DatabaseSchemaType } from "../../types";
|
||||
type Params = {
|
||||
userId?: string | number;
|
||||
};
|
||||
|
@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = grabUserSchemaData;
|
||||
const serverError_1 = __importDefault(require("./serverError"));
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
const grab_dir_names_1 = __importDefault(require("@/package-shared/utils/backend/names/grab-dir-names"));
|
||||
const client_exports_1 = require("@/client-exports");
|
||||
const grab_dir_names_1 = __importDefault(require("../../utils/backend/names/grab-dir-names"));
|
||||
const ejson_1 = __importDefault(require("../../utils/ejson"));
|
||||
/**
|
||||
* # Grab User Schema Data
|
||||
*/
|
||||
@ -16,7 +16,7 @@ function grabUserSchemaData({ userId, }) {
|
||||
try {
|
||||
const { userSchemaMainJSONFilePath } = (0, grab_dir_names_1.default)({ userId });
|
||||
const schemaJSON = fs_1.default.readFileSync(userSchemaMainJSONFilePath || "", "utf-8");
|
||||
const schemaObj = client_exports_1.EJSON.parse(schemaJSON);
|
||||
const schemaObj = ejson_1.default.parse(schemaJSON);
|
||||
return schemaObj;
|
||||
}
|
||||
catch (error) {
|
||||
|
@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = setUserSchemaData;
|
||||
const serverError_1 = __importDefault(require("./serverError"));
|
||||
const fs_1 = __importDefault(require("fs"));
|
||||
const grab_dir_names_1 = __importDefault(require("@/package-shared/utils/backend/names/grab-dir-names"));
|
||||
const grab_dir_names_1 = __importDefault(require("../../utils/backend/names/grab-dir-names"));
|
||||
/**
|
||||
* # Set User Schema Data
|
||||
*/
|
||||
|
@ -3,12 +3,13 @@ import { default as grabUserSchemaData } from "../../functions/backend/grabUserS
|
||||
import { default as setUserSchemaData } from "../../functions/backend/setUserSchemaData";
|
||||
import addDbEntry from "../../functions/backend/db/addDbEntry";
|
||||
import slugToCamelTitle from "../../shell/utils/slugToCamelTitle";
|
||||
import { DSQL_DATASQUIREL_USER_DATABASES } from "@/package-shared/types/dsql";
|
||||
import { DSQL_DATASQUIREL_USER_DATABASES } from "../../types/dsql";
|
||||
import {
|
||||
DSQL_FieldSchemaType,
|
||||
DSQL_IndexSchemaType,
|
||||
DSQL_MYSQL_SHOW_COLUMNS_Type,
|
||||
DSQL_TableSchemaType,
|
||||
} from "@/package-shared/types";
|
||||
} from "../../types";
|
||||
|
||||
type Params = {
|
||||
userId: number | string;
|
||||
@ -113,8 +114,7 @@ export default async function createDbSchemaFromDb({
|
||||
|
||||
if (!Index_comment?.match(/^schema_index$/)) continue;
|
||||
|
||||
const indexNewObject: import("@/package-shared/types").DSQL_IndexSchemaType =
|
||||
{
|
||||
const indexNewObject: DSQL_IndexSchemaType = {
|
||||
indexType: Index_type?.match(/fulltext/i)
|
||||
? "fullText"
|
||||
: "regular",
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { DSQL_DatabaseSchemaType, UserType } from "@/package-shared/types";
|
||||
import { DSQL_DatabaseSchemaType, UserType } from "../../types";
|
||||
import serverError from "./serverError";
|
||||
import fs from "fs";
|
||||
import grabDirNames from "@/package-shared/utils/backend/names/grab-dir-names";
|
||||
import { EJSON } from "@/client-exports";
|
||||
import grabDirNames from "../../utils/backend/names/grab-dir-names";
|
||||
import EJSON from "../../utils/ejson";
|
||||
|
||||
type Params = {
|
||||
userId?: string | number;
|
||||
|
@ -2,7 +2,7 @@ import serverError from "./serverError";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
import { DSQL_DatabaseSchemaType } from "../../types";
|
||||
import grabDirNames from "@/package-shared/utils/backend/names/grab-dir-names";
|
||||
import grabDirNames from "../../utils/backend/names/grab-dir-names";
|
||||
|
||||
type Param = {
|
||||
userId: string | number;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "4.7.3",
|
||||
"version": "4.7.4",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
Loading…
Reference in New Issue
Block a user