コード例 #1
0
        public int RunPlatformsOption(PlatformsOption opts)
        {
            try
            {
                string platforms = @"
                                    SqlServer: 
                                       Supported versions:
                                       Usage: yuniql run -c <your-connection-string> --platform sqlserver
                                       Samples: https://github.com/rdagumampan/yuniql/tree/master/samples/basic-sqlserver-sample

                                    PostgreSql: 
                                       Supported versions:
                                       Usage: yuniql run -c <your-connection-string> --platform postgresql
                                       Samples: https://github.com/rdagumampan/yuniql/tree/master/samples/basic-postgresql-sample

                                    MySql: 
                                       Supported versions:
                                       Usage: yuniql run -c <your-connection-string> --platform mysql
                                       Samples: https://github.com/rdagumampan/yuniql/tree/master/samples/basic-mysql-sample

                                    MariaDB: 
                                       Supported versions:
                                       Usage: yuniql run -c <your-connection-string> --platform mariadb
                                       Samples: https://yuniql.io/docs/get-started/";

                Console.WriteLine(platforms);

                return(0);
            } catch (Exception ex)
            {
                return(OnException(ex, "Failed to execute RunPlatformsOption function", opts.Debug, _traceService));
            }
        }
コード例 #2
0
        public int RunPlatformsOption(PlatformsOption opts)
        {
            try
            {
                Console.WriteLine(@"Supported database platforms and available samples. For specific versions, please refer to latest documentation pages.");

                //iterate through supported db and get manifest data
                var fields = typeof(SUPPORTED_DATABASES).GetFields();
                foreach (var field in fields)
                {
                    var platformManifest = _manifestFactory.Create(field.Name.ToLower());
                    var message          = string.Format(@"
Name: {0}
Usage:{1}
Getting started: {2}
Samples: {3}", platformManifest.Name, platformManifest.Usage, platformManifest.DocumentationUrl, platformManifest.SamplesUrl);
                    Console.WriteLine(message);
                }
                return(0);
            }
            catch (Exception ex)
            {
                Console.WriteLine();
                return(OnException(ex, "Failed to execute platforms function", opts.IsDebug));
            }
        }
コード例 #3
0
        public int RunPlatformsOption(PlatformsOption opts)
        {
            try
            {
                string platforms = @"Supported database platforms and available samples. For specific versions, please refer to latest documentation pages.

    //TODO: show released, preview, alpha, beta
    SqlServer | Released: 
        Supported versions: https://yuniql.io/docs/supported-platforms/
        Usage: yuniql run -a -c <your-connection-string> --platform sqlserver
        Samples: https://github.com/rdagumampan/yuniql/tree/master/samples/basic-sqlserver-sample

    PostgreSql | Released: 
        Supported versions: https://yuniql.io/docs/supported-platforms/
        Usage: yuniql run -a -c <your-connection-string> --platform postgresql
        Samples: https://github.com/rdagumampan/yuniql/tree/master/samples/basic-postgresql-sample

    MySql | Released: 
        Supported versions: https://yuniql.io/docs/supported-platforms/
        Usage: yuniql run -a -c <your-connection-string> --platform mysql
        Samples: https://github.com/rdagumampan/yuniql/tree/master/samples/basic-mysql-sample

    MariaDb | Released: 
        Supported versions: https://yuniql.io/docs/supported-platforms/
        Supported versions: 
        Usage: yuniql run -a -c <your-connection-string> --platform mariadb
        Samples: https://github.com/rdagumampan/yuniql/tree/master/samples/basic-mysql-sample

    Snowflake | Preview: 
        Supported versions: https://yuniql.io/docs/supported-platforms/
        Supported versions: 
        Usage: yuniql run -a -c <your-connection-string> --platform snowflake
        Samples: https://github.com/rdagumampan/yuniql/tree/master/samples/basic-snowflake-sample

    Redshift| Preview: 
        Supported versions: https://yuniql.io/docs/supported-platforms/
        Supported versions: 
        Usage: yuniql run -a -c <your-connection-string> --platform redshift
        Samples: https://github.com/rdagumampan/yuniql/tree/master/samples/basic-redshift-sample
";

                Console.WriteLine(platforms);

                return(0);
            }
            catch (Exception ex)
            {
                return(OnException(ex, "Failed to execute platforms function", opts.IsDebug));
            }
        }