package lama.sqlite3.gen;

import lama.Query;
import lama.QueryAdapter;

public class SQLite3AnalyzeGenerator {
	
	public static Query generateAnalyze() {
		return new QueryAdapter("ANALYZE");
	}

}

@@ -64,16 +64,80 @@
 Adapter;
+%0Aimport lama.Randomly;%0Aimport lama.sqlite3.schema.SQLite3Schema;
 %0A%0Apublic
@@ -169,17 +169,16 @@
 rator %7B%0A
-%09
 %0A%09public
@@ -211,11 +211,208 @@
 yze(
-) %7B
+SQLite3Schema newSchema) %7B%0A%09%09StringBuilder sb = new StringBuilder(%22ANALYZE%22);%0A%09%09if (Randomly.getBoolean()) %7B%0A%09%09%09sb.append(%22 %22);%0A%09%09%09sb.append(newSchema.getRandomTable().getName());%0A%09%09%09// TODO index%0A%09%09%7D
 %0A%09%09r
@@ -434,25 +434,29 @@
 Adapter(
-%22ANALYZE%22
+sb.toString()
 );%0A%09%7D%0A%0A%7D

Support ANALYZE for a single table