Example #1
0
        public static string GetPath(Engines.EnginesMode EngineMode)
        {
            int StackPointer = Stack.Add($"UI.GetPath({EngineMode})");

            if (Program.ArgumentCount == 1 && GlobalStatic.LoadedFile == false)
            {
                GlobalStatic.LoadedFile = true;
                Stack.Exit(StackPointer);
                return(Program.GetArgument(1));
            }
            switch (EngineMode)
            {
            case Engines.EnginesMode.SQLITE:
                Stack.Exit(StackPointer);
                return(LDDialogs.OpenFile(GlobalStatic.Extensions, GlobalStatic.LastFolder + "\\"));

            default:
                throw new NotImplementedException();
            }
        }
Example #2
0
        public static Dictionary <string, string> SQL_Fetch_Type(Primitive SchemaQuery, Primitive Schema, Engines.EnginesMode CurrentEngine)
        {
            int StackPointer = Stack.Add("Export.SQL_Fetch_Type");

            Engines.IEngine engine;
            switch (CurrentEngine)
            {
            case Engines.EnginesMode.SQLITE:
                engine = new Engines.SQLite();
                break;

            default:
                throw new PlatformNotSupportedException("Current Engine is not supported");
            }
            return(engine.GetTypes(SchemaQuery, Schema));
        }
Example #3
0
        /// <summary>
        ///  Fetches the Primary Key Information on everything
        /// </summary>
        public static Dictionary <string, bool> SQL_Fetch_PK(Primitive SchemaQuery, Primitive Schema, Engines.EnginesMode CurrentEngine)
        {
            int StackPointer = Stack.Add("Export.SQL_Fetch_PK");
            Dictionary <string, bool> _Dictionary = new Dictionary <string, bool>();

            switch (CurrentEngine)
            {
            case Engines.EnginesMode.SQLITE:
                for (int i = 1; i <= SchemaQuery.GetItemCount(); i++)
                {
                    for (int ii = 1; ii <= Schema.GetItemCount(); ii++)
                    {
                        if (Schema[ii] == SchemaQuery[i]["name"])
                        {
                            if (SchemaQuery[i]["pk"] == 1)
                            {
                                _Dictionary.Add(SchemaQuery[i]["name"], true);
                            }
                            else
                            {
                                _Dictionary.Add(SchemaQuery[i]["name"], false);
                            }
                        }
                    }
                }
                Stack.Exit(StackPointer);
                return(_Dictionary);

            default:
                throw new NotImplementedException("Current Engine is not supported");
            }
        }