Create an log record by using a table to provide the parts.

    .. seealso: :func:`step_I_create_logrecords_with_table()`
489316
def step_I_create_logrecord_with_table(context):
    
    assert context.table, "REQUIRE: context.table"
    assert len(context.table.rows) == 1, "REQUIRE: table.row.size == 1"
    step_I_create_logrecords_with_table(context)
1165498
def createRecordItems(self, records, parent=None):
        
        if parent is None:
            parent=self
            
        blocked = self.signalsBlocked()
        self.blockSignals(True)
        self.setUpdatesEnabled(False)
        for record in records:
            self.recordItemClass(record)(parent, record)
        
        if not blocked:
            self.blockSignals(False)
            self.setUpdatesEnabled(True)
1118149
def create_table(clas,pool_or_cursor):
    ""
    def mkfield((name,tp)): return name,(tp if isinstance(tp,basestring) else 'jsonb')
    fields = ','.join(map(' '.join,map(mkfield,clas.FIELDS)))
    base = 'create table if not exists %s (%s'%(clas.TABLE,fields)
    if clas.PKEY: base += ',primary key (%s)'%clas.PKEY
    base += ')'
    commit_or_execute(pool_or_cursor,base)
    clas.create_indexes(pool_or_cursor)
130388
def table(self, table):
        
        try:
            blueprint = self._create_blueprint(table)

            yield blueprint
        except Exception as e:
            raise

        try:
            self._build(blueprint)
        except Exception:
            raise
1094152
def create_tables(self):
        
        cdir = os.path.dirname( os.path.realpath(__file__) )
        
        # table schemas -------------------------------------
        schema = os.path.join(cdir,"data","partsmaster.sql")
        if self.debug:
            print(self.hdr,"parts master schema is ",schema)
        
        self.populate(schema)
        
        schema = os.path.join(cdir,"data","approvedmfg.sql")
        if self.debug:
            print(self.hdr,"approved mfg list schema is ",schema)
        
        self.populate(schema)
        
        schema = os.path.join(cdir,"data","attachment.sql")
        if self.debug:
            print(self.hdr,"attachment schema is ",schema)
        
        self.populate(schema)

        schema = os.path.join(cdir,"data","bom.sql")
        if self.debug:
            print(self.hdr,"bill of materials schema is ",schema)
        
        self.populate(schema)
        
        return
929434
def create_table(self, table, fields):
        
        table = table.get_soap_object(self.client)
        return self.call('createTable', table, fields)
1055410
public void createTable() {
    // [START bigtable_hw_create_table_veneer]
    // Checks if table exists, creates table if does not exist.
    if (!adminClient.exists(tableId)) {
      System.out.println("Creating table: " + tableId);
      CreateTableRequest createTableRequest =
          CreateTableRequest.of(tableId).addFamily(COLUMN_FAMILY);
      adminClient.createTable(createTableRequest);
      System.out.printf("Table %s created successfully%n", tableId);
    }
    // [END bigtable_hw_create_table_veneer]
  }
1055790
def create_table_with_pk(self, table, fields, primary_keys):
        
        table = table.get_soap_object(self.client)
        return self.call('createTableWithPK', table, fields, primary_keys)
778614
def create_table(table)
      puts "attempting to create table #{table}..."
      begin
        tt = @dbr.prepare("CREATE TABLE #{table}(id INTEGER PRIMARY KEY);")
        ee = tt.execute
        puts "table created correctly.".green
      rescue
        puts "error while creating table #{table}".red
        exit
      end
    end
966395
def create_table(self, name, data, columns=None, add_pk=True):
        """"""
        # TODO: Issue occurs when bool values exist in data
        # Remove if the table exists
        if name in self.tables:
            self.drop(name)

        # Set headers list
        if not columns:
            columns = data[0]

        # Validate data shape
        for row in data:
            assert len(row) == len(columns)

        # Create dictionary of column types
        col_types = {columns[i]: sql_column_type([d[i] for d in data], prefer_int=True, prefer_varchar=True)
                     for i in range(0, len(columns))}

        # Join column types into SQL string
        cols = ''.join(['\t{0} {1},\n'.format(name, type_) for name, type_ in col_types.items()])[:-2] + '\n'
        statement = 'CREATE TABLE {0} ({1}{2})'.format(name, '\n', cols)
        self.execute(statement)
        if add_pk:
            self.set_primary_key_auto()
        return True
421457
protected function setup_table() {
        $filter = $this->setup_filters();
        $this->tablelog = new report_loglive_table_log('report_loglive', $filter);
        $this->tablelog->define_baseurl($this->url);
    }
415266
def set_table(self, table):
        
        super(MultiField, self).set_table(table)
        if self.field and self.field.table is None:
            self.field.set_table(self.table)
1296561
def create_table(table, data):
    

    fields = data['fields']
    query = '('
    indexed_fields = ''

    for key, value in fields.items():
        non_case_field = value[0][0:value[0].find('(')]

        if non_case_field == 'int':
            sign = value[0][value[0].find(',') + 1:-1:].strip()
            if sign == 'signed':
                field_type = 'Int'
            else:
                field_type = 'UInt'

            bits = re.findall('\d+', value[0])[0]
            field = key + ' ' + field_type + bits
            query += field + ','

        elif non_case_field == 'strin':
            field_type = 'String'
            field = key + ' ' + field_type
            query += field + ','

        elif non_case_field == 'float':
            field_type = 'Float'
            bits = re.findall('\d+', value[0])[0]
            field = key + ' ' + field_type + bits
            query += field + ','

        if value[1] == 'yes':
            indexed_fields += key + ','

    query = query[:-1:] + f",date Date) ENGINE = MergeTree(date, ({indexed_fields} date), 8192)"

    client.execute(f"CREATE TABLE {table} {query}")
1112276
def insert_record_by_fieldspecs_with_values(
            self,
            table: str,
            fieldspeclist: FIELDSPECLIST_TYPE) -> int:
        
        fields = []
        values = []
        for fs in fieldspeclist:
            fields.append(fs["name"])
            values.append(fs["value"])
        return self.insert_record(table, fields, values)
487024
def build_table(self, msg):
        """"""
        rows = msg.split('\n')
        if rows:
            header_row, *body_rows = rows
            self.create_md_row(header_row, True)
            for row in body_rows:
                self.create_md_row(row)
691828
def _create_record(self, rtype, name, content):
        
        with self._session(self.domain, self.domain_id) as ddata:
            # Validate method parameters
            if not rtype or not name or not content:
                LOGGER.warning('Hetzner => Record has no rtype|name|content specified')
                return False

            # Add record to zone
            name = ddata['cname'] if ddata['cname'] else self._fqdn_name(name)
            rrset = ddata['zone']['data'].get_rdataset(name, rdtype=rtype, create=True)
            for rdata in rrset:
                if self._convert_content(rtype, content) == rdata.to_text():
                    LOGGER.info('Hetzner => Record with content \'%s\' already exists',
                                content)
                    return True

            ttl = (rrset.ttl if 0 < rrset.ttl < self._get_lexicon_option('ttl')
                   else self._get_lexicon_option('ttl'))
            rdataset = dns.rdataset.from_text(rrset.rdclass, rrset.rdtype,
                                              ttl, self._convert_content(rtype, content))
            rrset.update(rdataset)
            # Post zone to Hetzner
            synced_change = self._post_zone(ddata['zone'])
            if synced_change:
                self._propagated_record(rtype, name, self._convert_content(rtype, content),
                                        ddata['nameservers'])
            return synced_change
1174074
def save_records(self, records):
        '''
        
        '''
        for record in records:
            if not isinstance(record, Record):
                record = Record(*record)
            self.save_record(*record)