Add Mac functionality
This commit is contained in:
@@ -47,6 +47,11 @@ classdef DBHandler < handle
|
|||||||
elseif options.type == "mysql"
|
elseif options.type == "mysql"
|
||||||
|
|
||||||
% datasource = "jdbc:mysql://134.245.243.254:3306/labor";
|
% datasource = "jdbc:mysql://134.245.243.254:3306/labor";
|
||||||
|
if ismac
|
||||||
|
driverlocation = "/Users/silas/Documents/mysql-connector-j-9.6.0/mysql-connector-j-9.6.0.jar";
|
||||||
|
else
|
||||||
|
driverlocation = "C:\Users\Silas\Documents\mysql-connector-j-9.3.0\mysql-connector-j-9.3.0.jar";
|
||||||
|
end
|
||||||
|
|
||||||
obj.conn = database( ...
|
obj.conn = database( ...
|
||||||
string(obj.dataBase), ... % Database name
|
string(obj.dataBase), ... % Database name
|
||||||
@@ -55,7 +60,7 @@ classdef DBHandler < handle
|
|||||||
"Vendor", "MySQL", ...
|
"Vendor", "MySQL", ...
|
||||||
"Server", options.server, ...
|
"Server", options.server, ...
|
||||||
"PortNumber", options.port, ...
|
"PortNumber", options.port, ...
|
||||||
"JDBCDriverLocation", "C:\Users\Silas\Documents\mysql-connector-j-9.3.0\mysql-connector-j-9.3.0.jar");
|
"JDBCDriverLocation", driverlocation);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -112,6 +112,11 @@ end
|
|||||||
function path = composeStoragePath(storagePath, relativePath)
|
function path = composeStoragePath(storagePath, relativePath)
|
||||||
relativePath = firstValue(relativePath);
|
relativePath = firstValue(relativePath);
|
||||||
path = char(string(storagePath) + string(relativePath));
|
path = char(string(storagePath) + string(relativePath));
|
||||||
|
if ismac
|
||||||
|
path = strrep(path,'\','/');
|
||||||
|
else
|
||||||
|
path = strrep(path,'/','\');
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function value = firstValue(value)
|
function value = firstValue(value)
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ dsp_options.mode = "run_id";
|
|||||||
dsp_options.recipe = @mpi_recipe_dev;
|
dsp_options.recipe = @mpi_recipe_dev;
|
||||||
dsp_options.append_to_db = false;
|
dsp_options.append_to_db = false;
|
||||||
dsp_options.start_occurence = 1;
|
dsp_options.start_occurence = 1;
|
||||||
dsp_options.max_occurences = 15;
|
dsp_options.max_occurences = 1;
|
||||||
dsp_options.debug_plots = false;
|
dsp_options.debug_plots = true;
|
||||||
|
|
||||||
write_mpi_reduction_db = 1;
|
write_mpi_reduction_db = 0;
|
||||||
stream_mpi_reduction_db = 1;
|
stream_mpi_reduction_db = 0;
|
||||||
mpi_reduction_study_name = "block_update_sweep";
|
mpi_reduction_study_name = "block_update_sweep";
|
||||||
mpi_reduction_writer_path = fullfile(fileparts(mfilename('fullpath')),"db");
|
mpi_reduction_writer_path = fullfile(fileparts(mfilename('fullpath')),"db");
|
||||||
addpath(mpi_reduction_writer_path);
|
addpath(mpi_reduction_writer_path);
|
||||||
@@ -16,8 +16,13 @@ addpath(mpi_reduction_writer_path);
|
|||||||
dsp_options.database_type = "mysql";
|
dsp_options.database_type = "mysql";
|
||||||
|
|
||||||
dsp_options.dataBase = "labor";
|
dsp_options.dataBase = "labor";
|
||||||
dsp_options.storage_path = "W:\labdata\ECOC Silas\ecoc_2025";
|
|
||||||
|
|
||||||
|
|
||||||
|
if ismac
|
||||||
|
dsp_options.storage_path = "/Volumes/media/labdata/ECOC Silas/ecoc_2025";
|
||||||
|
else
|
||||||
|
dsp_options.storage_path = "W:\labdata\ECOC Silas\ecoc_2025";
|
||||||
|
end
|
||||||
dsp_options.server = "192.168.178.192";
|
dsp_options.server = "192.168.178.192";
|
||||||
dsp_options.port = 3306;
|
dsp_options.port = 3306;
|
||||||
dsp_options.user = "silas";
|
dsp_options.user = "silas";
|
||||||
@@ -63,7 +68,7 @@ for i = 1
|
|||||||
|
|
||||||
%% === Warehouse setup ===
|
%% === Warehouse setup ===
|
||||||
dsp_options.userParameters = struct();
|
dsp_options.userParameters = struct();
|
||||||
dsp_options.userParameters.block_update = [1,2,4,8,16,32,64,112,224,448,448*2,1024,2048,4096,8192,16384];%%logspace(-3.8,-1,22);%[linspace(2,4096,22)];
|
dsp_options.userParameters.block_update = 1;%[1,2,4,8,16,32,64,112,224,448,448*2,1024,2048,4096,8192,16384];%%logspace(-3.8,-1,22);%[linspace(2,4096,22)];
|
||||||
% dsp_options.userParameters.block_update = linspace(1,224,22);
|
% dsp_options.userParameters.block_update = linspace(1,224,22);
|
||||||
wh = DataStorage(dsp_options.userParameters);
|
wh = DataStorage(dsp_options.userParameters);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user