use of io.questdb.griffin.engine.functions.bind.BindVariableServiceImpl in project questdb by bluestreak01.
the class AbstractGriffinTest method setUpStatic.
@BeforeClass
public static void setUpStatic() {
AbstractCairoTest.setUpStatic();
compiler = new SqlCompiler(engine);
bindVariableService = new BindVariableServiceImpl(configuration);
sqlExecutionContext = new SqlExecutionContextImpl(engine, 1).with(AllowAllCairoSecurityContext.INSTANCE, bindVariableService, null, -1, null);
bindVariableService.clear();
}
use of io.questdb.griffin.engine.functions.bind.BindVariableServiceImpl in project questdb by bluestreak01.
the class ImportIODispatcherTest method setupSql.
private void setupSql(CairoEngine engine) {
compiler = new SqlCompiler(engine);
BindVariableServiceImpl bindVariableService = new BindVariableServiceImpl(engine.getConfiguration());
sqlExecutionContext = new SqlExecutionContextImpl(engine, 1).with(AllowAllCairoSecurityContext.INSTANCE, bindVariableService, null, -1, null);
bindVariableService.clear();
}
use of io.questdb.griffin.engine.functions.bind.BindVariableServiceImpl in project questdb by bluestreak01.
the class TableBackupTest method setup.
@Before
public void setup() throws IOException {
path = new Path();
finalBackupPath = new Path();
mkdirsErrno = -1;
renameErrno = -1;
FilesFacade ff = new FilesFacadeImpl() {
private int nextErrno = -1;
@Override
public int errno() {
if (nextErrno != -1) {
int errno = nextErrno;
nextErrno = -1;
return errno;
}
return super.errno();
}
@Override
public int mkdirs(LPSZ path, int mode) {
if (mkdirsErrno != -1 && --mkdirsErrnoCountDown < 1) {
nextErrno = mkdirsErrno;
mkdirsErrno = -1;
mkdirsErrnoCountDown = 0;
return -1;
}
return super.mkdirs(path, mode);
}
@Override
public boolean rename(LPSZ from, LPSZ to) {
if (renameErrno != -1) {
nextErrno = renameErrno;
renameErrno = -1;
return false;
}
return super.rename(from, to);
}
};
CharSequence root = temp.newFolder(String.format("dbRoot%c%s", Files.SEPARATOR, PropServerConfiguration.DB_DIRECTORY)).getAbsolutePath();
backupRoot = temp.newFolder("dbBackupRoot").getAbsolutePath();
mainConfiguration = new DefaultCairoConfiguration(root) {
@Override
public FilesFacade getFilesFacade() {
return ff;
}
@Override
public CharSequence getBackupRoot() {
return backupRoot;
}
@Override
public DateFormat getBackupDirTimestampFormat() {
return new TimestampFormatCompiler().compile("ddMMMyyyy");
}
};
mainEngine = new CairoEngine(mainConfiguration);
mainCompiler = new SqlCompiler(mainEngine);
mainSqlExecutionContext = new SqlExecutionContextImpl(mainEngine, 1).with(AllowAllCairoSecurityContext.INSTANCE, new BindVariableServiceImpl(mainConfiguration), null, -1, null);
// dummy configuration
File confRoot = new File(PropServerConfiguration.confRoot(root));
Assert.assertTrue(confRoot.mkdirs());
Assert.assertTrue(new File(confRoot, "server.conf").createNewFile());
Assert.assertTrue(new File(confRoot, "mime.types").createNewFile());
Assert.assertTrue(new File(confRoot, "log-file.conf").createNewFile());
Assert.assertTrue(new File(confRoot, "date.formats").createNewFile());
}
use of io.questdb.griffin.engine.functions.bind.BindVariableServiceImpl in project questdb by bluestreak01.
the class TxSerializerTest method setUpStatic.
@BeforeClass
public static void setUpStatic() {
setCairoStatic();
compiler = new SqlCompiler(engine);
BindVariableServiceImpl bindVariableService = new BindVariableServiceImpl(configuration);
sqlExecutionContext = new SqlExecutionContextImpl(engine, 1).with(AllowAllCairoSecurityContext.INSTANCE, bindVariableService, null, -1, null);
bindVariableService.clear();
}
Aggregations