class Analyze extends DefinitionStatement {

    /**
     * The sample size.
     */
    private int sample;

    public Analyze(ServerSession session) {
        super(session);
        sample = session.getDatabase().getSettings().analyzeSample;
    }

    @Override
    public int getType() {
        return SQLStatement.ANALYZE;
    }

    public void setSample(int sample) {
        this.sample = sample;
    }

    @Override
    public int update() {<FILL_FUNCTION_BODY>}
}

        session.getUser().checkAdmin();
        Database db = session.getDatabase();
        for (Table table : db.getAllTablesAndViews(false)) {
            table.analyze(session, sample);
        }
        return 0;
    
<methods>public boolean isDDL() <variables>