Skip to content

Commit

Permalink
Merge pull request #121 from Geodan/remove_sql_timeout
Browse files Browse the repository at this point in the history
remove sql timeout (set to infinite)
  • Loading branch information
bertt authored Oct 16, 2023
2 parents 346d158 + 53b3950 commit cfdbc0e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,6 @@ If --username and/or --dbname are not specified the current username is used as
--copyright (Default: '') glTF asset copyright
--sql_command_timeout (Default: 30) SQL command timeout
--default_color (Default: #FFFFFF) Default color
--default_metallic_roughness (Default: #008000) Default metallic roughness
Expand Down
3 changes: 0 additions & 3 deletions src/pg2b3dm/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ public class Options
[Option("copyright", Required = false, Default = "", HelpText = "glTF asset copyright")]
public string Copyright { get; set; }

[Option("sql_command_timeout", Required = false, Default = 30, HelpText = "SQL command timeout")]
public int SqlCommandTimeout { get; set; }

[Option("default_color", Required = false, Default = "#FFFFFF", HelpText = "Default color")]
public string DefaultColor { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion src/pg2b3dm/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static void Main(string[] args)
o.User = string.IsNullOrEmpty(o.User) ? Environment.UserName : o.User;
o.Database = string.IsNullOrEmpty(o.Database) ? Environment.UserName : o.Database;

var connectionString = $"Host={o.Host};Username={o.User};Database={o.Database};Port={o.Port};CommandTimeOut={o.SqlCommandTimeout}";
var connectionString = $"Host={o.Host};Username={o.User};Database={o.Database};Port={o.Port};CommandTimeOut=0";
var istrusted = TrustedConnectionChecker.HasTrustedConnection(connectionString);
if (!istrusted) {
Console.Write($"Password for user {o.User}: ");
Expand Down

0 comments on commit cfdbc0e

Please sign in to comment.